summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoey Hess2020-06-17 17:57:04 -0400
committerJoey Hess2020-06-17 17:58:12 -0400
commit745784f61bdd678e20b1b18743f18d458836a802 (patch)
tree7a345c7c4bb7a7ead33c86d1dabe1f5840f11d1a /src
parent298f437253fd87a3f412ae875a56b7833da956e0 (diff)
Support bootstrapping to hosts using cabal 3.x, with new-dist directory.
* Support bootstrapping to hosts using cabal 3.x, with new-dist directory. * Makefile: Fix build with cabal 3.x. This assumes that, once a new-dist directory is created, the host won't revert back to using dist. So it always prefers binaries from new-dist over dist. This commit was sponsored by LND on Patreon.
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Bootstrap.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Propellor/Bootstrap.hs b/src/Propellor/Bootstrap.hs
index d772d7c7..0fef92f1 100644
--- a/src/Propellor/Bootstrap.hs
+++ b/src/Propellor/Bootstrap.hs
@@ -81,7 +81,12 @@ buildCommand bs = intercalate " && " (go (getBuilder bs))
go Cabal =
[ "cabal configure"
, "cabal build -j1 propellor-config"
- , "ln -sf dist/build/propellor-config/propellor-config propellor"
+ , intercalate "; "
+ [ "if [ -d dist-newstyle ]"
+ , "then ln -sf $(find dist-newstyle/ -executable -type f | grep 'build/propellor-config/propellor-config$') propellor"
+ , "else ln -sf dist/build/propellor-config/propellor-config propellor"
+ , "fi"
+ ]
]
go Stack =
[ "stack build :propellor-config"