summaryrefslogtreecommitdiff
path: root/src/Propellor/Bootstrap.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2015-05-06 14:29:12 -0400
committerJoey Hess <joeyh@joeyh.name>2015-05-06 14:29:12 -0400
commit9ec4b33dbb62e42b8d284d1aeddf32a395fd7cc0 (patch)
treeb9067a945a430af4868be1a0fcf052db5c4cd5fc /src/Propellor/Bootstrap.hs
parentb4877efea5375cb83951d6dd1d3dbf9d70208cf8 (diff)
parent160eff0eb7ebbb2da2c3864dbe83bf7db76c8bb6 (diff)
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Bootstrap.hs')
-rw-r--r--src/Propellor/Bootstrap.hs18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/Propellor/Bootstrap.hs b/src/Propellor/Bootstrap.hs
index a07347ed..51ba69a4 100644
--- a/src/Propellor/Bootstrap.hs
+++ b/src/Propellor/Bootstrap.hs
@@ -17,12 +17,10 @@ type ShellCommand = String
-- Should be run inside the propellor config dir, and will install
-- all necessary build dependencies and build propellor.
bootstrapPropellorCommand :: ShellCommand
-bootstrapPropellorCommand = "if ! test -x ./propellor; then " ++ go ++ "; fi;" ++ checkBinaryCommand
- where
- go = intercalate " && "
- [ depsCommand
- , buildCommand
- ]
+bootstrapPropellorCommand = checkDepsCommand ++
+ "&& if ! test -x ./propellor; then "
+ ++ buildCommand ++
+ "; fi;" ++ checkBinaryCommand
-- Use propellor --check to detect if the local propellor binary has
-- stopped working (eg due to library changes), and must be rebuilt.
@@ -41,6 +39,11 @@ buildCommand = intercalate " && "
, "ln -sf dist/build/propellor-config/propellor-config propellor"
]
+-- Run cabal configure to check if all dependencies are installed;
+-- if not, run the depsCommand.
+checkDepsCommand :: ShellCommand
+checkDepsCommand = "if ! cabal configure >/dev/null 2>&1; then " ++ depsCommand ++ "; fi"
+
-- Install build dependencies of propellor.
--
-- First, try to install ghc, cabal, gnupg, and all haskell libraries that
@@ -77,7 +80,8 @@ depsCommand = "( " ++ intercalate " ; " (concat [osinstall, cabalinstall]) ++ "
, "libghc-network-dev"
, "libghc-quickcheck2-dev"
, "libghc-mtl-dev"
- , "libghc-monadcatchio-transformers-dev"
+ , "libghc-transformers-dev"
+ , "libghc-exceptions-dev"
]
installGitCommand :: ShellCommand