summaryrefslogtreecommitdiff
path: root/src/Propellor
diff options
context:
space:
mode:
authorJoey Hess2014-11-22 00:36:16 -0400
committerJoey Hess2014-11-22 00:36:16 -0400
commit083b82d8100ef1915a00f8fbcd1530b85448dc9d (patch)
tree81833733983023aaaca1baaedf920adc5dd5d088 /src/Propellor
parent1af398d33eee40a13d7c310e6f97b170b47d21ff (diff)
propellor spin
Diffstat (limited to 'src/Propellor')
-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 fb37ff1a..fde9c2ec 100644
--- a/src/Propellor/Server.hs
+++ b/src/Propellor/Server.hs
@@ -129,13 +129,13 @@ sendPrecompiled hn = void $ actionMessage ("Uploading locally compiled propellor
withTmpDir "propellor" $ \tmpdir ->
bracket getWorkingDirectory changeWorkingDirectory $ \_ -> do
let shimdir = "propellor"
- createDirectoryIfMissing True shimdir
- changeWorkingDirectory shimdir
+ createDirectoryIfMissing True (tmpdir </> shimdir)
+ changeWorkingDirectory (tmpdir </> shimdir)
me <- readSymbolicLink "/proc/self/exe"
shim <- Shim.setup me "."
+ when (shim /= "propellor") $
+ renameFile shim "propellor"
changeWorkingDirectory tmpdir
- when (shim /= shimdir </> "propellor") $
- renameFile shim (shimdir </> "propellor")
withTmpFile "propellor.tar." $ \tarball _ -> allM id
[ boolSystem "strip" [File me]
, boolSystem "tar" [Param "cf", File tarball, File shimdir]