summaryrefslogtreecommitdiff
path: root/src/Propellor/Bootstrap.hs
diff options
context:
space:
mode:
authorJoey Hess2020-06-18 11:24:48 -0400
committerJoey Hess2020-06-18 11:27:22 -0400
commita2b47d3a3c8d64ccf7b1444a4608b88bd470aff6 (patch)
tree61e4d033cc008a4e5111e719390855a30ec2bd8c /src/Propellor/Bootstrap.hs
parent745784f61bdd678e20b1b18743f18d458836a802 (diff)
tail the dist-newstyle find
Unfortunately builds for previous versions can linger in there. Which may be a cruft accumulation problem generally, but for now I don't want it to fail if more than one is found. Assuming that the last item in the find will be the newest. This commit was sponsored by Brock Spratlen on Patreon.
Diffstat (limited to 'src/Propellor/Bootstrap.hs')
-rw-r--r--src/Propellor/Bootstrap.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Propellor/Bootstrap.hs b/src/Propellor/Bootstrap.hs
index 0fef92f1..84a26ee3 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$') propellor"
+ , "then ln -sf $(find dist-newstyle/ -executable -type f | grep 'build/propellor-config/propellor-config$' | tail -n1) propellor"
, "else ln -sf dist/build/propellor-config/propellor-config propellor"
, "fi"
]