summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--src/Propellor/Bootstrap.hs2
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8f0414fe..fffecb1e 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ DATE := $(shell dpkg-parsechangelog 2>/dev/null | grep Date | cut -d " " -f2-)
build: tags propellor.1 configured
$(CABAL) build
@if [ -d dist-newstyle ]; then \
- ln -sf $$(find dist-newstyle/ -executable -type f | grep 'build/propellor-config/propellor-config$$' | tail -n1) propellor; \
+ ln -sf $$(cabal exec -- sh -c 'command -v propellor-config') propellor; \
else \
ln -sf dist/build/propellor-config/propellor-config propellor; \
fi
diff --git a/src/Propellor/Bootstrap.hs b/src/Propellor/Bootstrap.hs
index 84a26ee3..d929c2cd 100644
--- a/src/Propellor/Bootstrap.hs
+++ b/src/Propellor/Bootstrap.hs
@@ -83,7 +83,7 @@ buildCommand bs = intercalate " && " (go (getBuilder bs))
, "cabal build -j1 propellor-config"
, intercalate "; "
[ "if [ -d dist-newstyle ]"
- , "then ln -sf $(find dist-newstyle/ -executable -type f | grep 'build/propellor-config/propellor-config$' | tail -n1) propellor"
+ , "then ln -sf $(cabal exec -- sh -c 'command -v propellor-config') propellor"
, "else ln -sf dist/build/propellor-config/propellor-config propellor"
, "fi"
]