about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorVincent Ambo <v.ambo@me.com>2012-03-13T04·31+0100
committerVincent Ambo <v.ambo@me.com>2012-03-13T04·31+0100
commit6092eb6f5e095c7a20f64e4149399391506dd9a0 (patch)
treecb9f94268e2c55454ce6e2f7733df79baa5e0297 /tools
parent1c4db3b576febde673a1b0bb615b6aee174f9cee (diff)
* blog is now running off acid-state (this thing is *fast*)
Diffstat (limited to 'tools')
-rw-r--r--tools/acid-migrate/Acid.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/acid-migrate/Acid.hs b/tools/acid-migrate/Acid.hs
index bc360694a64d..276102eb030b 100644
--- a/tools/acid-migrate/Acid.hs
+++ b/tools/acid-migrate/Acid.hs
@@ -19,7 +19,8 @@ import Data.SafeCopy        (SafeCopy, base, deriveSafeCopy)
 import Data.Text            (Text, pack)
 import Data.Text.Lazy       (toStrict)
 import Data.Time
-import Happstack.Server hiding (Session)
+import           System.Environment(getEnv)
+
 
 import qualified Crypto.Hash.SHA512 as SHA (hash)
 import qualified Data.ByteString.Char8 as B
@@ -256,7 +257,8 @@ pasteToDB acid !e = update' acid (InsertEntry e)
 
 main :: IO()
 main = do
-    bracket (openLocalState initialBlogState)
+    tbDir <- getEnv "TAZBLOG"
+    bracket (openLocalStateFrom (tbDir ++ "/BlogState") initialBlogState)
             (createCheckpointAndClose)
             (\acid -> convertEntries acid)