diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Init.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Init.hs b/src/Init.hs index 09f8ed7..c79a76e 100644 --- a/src/Init.hs +++ b/src/Init.hs @@ -11,7 +11,8 @@ import Data.Char (isAlphaNum, isNumber) import Data.List (foldl', intercalate, isPrefixOf) import Data.Version (Version (..)) import System.Directory (canonicalizePath, copyFile, - doesFileExist) + doesFileExist, + setPermissions, getPermissions, writable) import System.Environment (getArgs, getProgName) import System.Exit (exitFailure) import System.FilePath (splitDirectories, (</>)) @@ -65,6 +66,10 @@ main = do putStrLn $ "Creating " ++ dst makeDirectories dst copyFile src dst + -- On some systems, the source folder may be readonly, + -- and copyFile will therefore create a readonly project... + p <- getPermissions dst + setPermissions dst (p {writable = True}) putStrLn $ "Creating " ++ cabalPath createCabal cabalPath name @@ -115,7 +120,7 @@ createCabal path name = , " main-is: site.hs" , " build-depends: base == 4.*" , " , hakyll == " ++ version' ++ ".*" - , " ghc-options: -threaded" + , " ghc-options: -threaded -rtsopts -with-rtsopts=-N" , " default-language: Haskell2010" ] where |