Permalink
Browse files

Use separate repository for config dir

We don't want to track any files in the config dir to allow easily
adding your own config files. Now we create the config dir during
setup if it does not exist.
  • Loading branch information...
1 parent 3b5a655 commit 4d8fb90462d8a39db901e5685b1118738dd88511 @dmpots committed Aug 30, 2010
Showing with 10 additions and 2 deletions.
  1. +10 −1 Setup.hs
  2. +0 −1 config/README
View
@@ -1,11 +1,20 @@
#!/usr/bin/env runhaskell
import Distribution.Simple
+import Distribution.PackageDescription
import Control.Monad
import System.Directory
import FindBench
import FindConfig
-main = defaultMainWithHooks simpleUserHooks {postConf = writeLocalConf, postClean = deleteLocalConf}
+main = defaultMainWithHooks simpleUserHooks {
+ preConf = createConfDir
+ , postConf = writeLocalConf
+ , postClean = deleteLocalConf}
+
+createConfDir _ _ = do
+ e <- doesDirectoryExist configDir
+ unless e (createDirectory configDir)
+ return emptyHookedBuildInfo
writeLocalConf _ _ _ _ = do
findLocalConfigs configDir
View
@@ -1 +0,0 @@
-This directory is for local configuration files

0 comments on commit 4d8fb90

Please sign in to comment.