summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2021-07-17 20:19:28 +0200
committerIgor Pashev <pashev.igor@gmail.com>2021-07-17 20:19:28 +0200
commit8ce817dd4453f35ce92afa531c540554429c7299 (patch)
tree90236cdc7e59bdf99b32467b89adcb8c5a0b8e22 /src
parentb861c20ff2d7460061e73492e3a945e48ef40bac (diff)
parentd739fd1eea40de9ded3b4f682c849d3c31eba92c (diff)
downloadhakyll-8ce817dd4453f35ce92afa531c540554429c7299.tar.gz
Merge branch 'master' of https://github.com/jaspervdj/hakyll
Diffstat (limited to 'src')
-rw-r--r--src/Init.hs9
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