propellor spin
This commit is contained in:
parent
1af398d33e
commit
083b82d810
|
@ -129,13 +129,13 @@ sendPrecompiled hn = void $ actionMessage ("Uploading locally compiled propellor
|
||||||
withTmpDir "propellor" $ \tmpdir ->
|
withTmpDir "propellor" $ \tmpdir ->
|
||||||
bracket getWorkingDirectory changeWorkingDirectory $ \_ -> do
|
bracket getWorkingDirectory changeWorkingDirectory $ \_ -> do
|
||||||
let shimdir = "propellor"
|
let shimdir = "propellor"
|
||||||
createDirectoryIfMissing True shimdir
|
createDirectoryIfMissing True (tmpdir </> shimdir)
|
||||||
changeWorkingDirectory shimdir
|
changeWorkingDirectory (tmpdir </> shimdir)
|
||||||
me <- readSymbolicLink "/proc/self/exe"
|
me <- readSymbolicLink "/proc/self/exe"
|
||||||
shim <- Shim.setup me "."
|
shim <- Shim.setup me "."
|
||||||
|
when (shim /= "propellor") $
|
||||||
|
renameFile shim "propellor"
|
||||||
changeWorkingDirectory tmpdir
|
changeWorkingDirectory tmpdir
|
||||||
when (shim /= shimdir </> "propellor") $
|
|
||||||
renameFile shim (shimdir </> "propellor")
|
|
||||||
withTmpFile "propellor.tar." $ \tarball _ -> allM id
|
withTmpFile "propellor.tar." $ \tarball _ -> allM id
|
||||||
[ boolSystem "strip" [File me]
|
[ boolSystem "strip" [File me]
|
||||||
, boolSystem "tar" [Param "cf", File tarball, File shimdir]
|
, boolSystem "tar" [Param "cf", File tarball, File shimdir]
|
||||||
|
|
Loading…
Reference in New Issue