Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 4d8fb90462d8a39db901e5685b1118738dd88511 1 parent 3b5a655
@dmpots authored
Showing with 10 additions and 2 deletions.
  1. +10 −1 Setup.hs
  2. +0 −1  config/README
View
11 Setup.hs
@@ -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  config/README
@@ -1 +0,0 @@
-This directory is for local configuration files
Please sign in to comment.
Something went wrong with that request. Please try again.