summaryrefslogtreecommitdiff
path: root/src/Propellor/Server.hs
diff options
context:
space:
mode:
authorJoey Hess2014-11-22 17:22:11 -0400
committerJoey Hess2014-11-22 17:22:11 -0400
commit95f78a058660701cd7eb182f4d1989da27718c2a (patch)
tree65924650eafc2da95480fad8b888746a727f7826 /src/Propellor/Server.hs
parentaa986724a2fa56aba0b8584deb33536d24d7f66d (diff)
propellor spin
Diffstat (limited to 'src/Propellor/Server.hs')
-rw-r--r--src/Propellor/Server.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Propellor/Server.hs b/src/Propellor/Server.hs
index 3fd34a51..77f72085 100644
--- a/src/Propellor/Server.hs
+++ b/src/Propellor/Server.hs
@@ -161,10 +161,10 @@ sendPrecompiled hn = void $ actionMessage ("Uploading locally compiled propellor
createDirectoryIfMissing True (tmpdir </> shimdir)
changeWorkingDirectory (tmpdir </> shimdir)
me <- readSymbolicLink "/proc/self/exe"
- me' <- catchDefaultIO me (readSymbolicLink me)
- shim <- Shim.setup me' "."
- when (shim /= "propellor") $
- renameFile shim "propellor"
+ createDirectoryIfMissing True "bin"
+ unlessM (boolSystem "cp" [File me, File "bin/propellor"]) $
+ errorMessage "failed copying in propellor"
+ void $ Shim.setup "bin/propellor" "."
changeWorkingDirectory tmpdir
withTmpFile "propellor.tar." $ \tarball _ -> allM id
[ boolSystem "strip" [File me]