summaryrefslogtreecommitdiff
path: root/src/Propellor/Shim.hs
diff options
context:
space:
mode:
authorDaniel Brooks2015-08-02 00:59:28 -0400
committerDaniel Brooks2015-08-02 00:59:28 -0400
commiteb15f06896aeb208d19f6f322905c7782125356e (patch)
tree6f28ac50e476e83b212e2827a10d4b6dee0730c9 /src/Propellor/Shim.hs
parent65b511e2d4f4ec9864167e414e76b967eda32dba (diff)
parentb7a9655a695103b3ca2e4e6edfe305f9b44d9250 (diff)
Merge branch 'joeyconfig' of git://git.kitenet.net/propellor into joeyconfig
Conflicts: src/Propellor/Property/SiteSpecific/IABak.hs
Diffstat (limited to 'src/Propellor/Shim.hs')
-rw-r--r--src/Propellor/Shim.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Propellor/Shim.hs b/src/Propellor/Shim.hs
index 5fc1ea05..7cdecefd 100644
--- a/src/Propellor/Shim.hs
+++ b/src/Propellor/Shim.hs
@@ -8,7 +8,6 @@ module Propellor.Shim (setup, cleanEnv, file) where
import Propellor
import Utility.LinuxMkLibs
-import Utility.SafeCommand
import Utility.FileMode
import Utility.FileSystemEncoding
@@ -21,7 +20,7 @@ import System.Posix.Files
-- Propellor may be running from an existing shim, in which case it's
-- simply reused.
setup :: FilePath -> Maybe FilePath -> FilePath -> IO FilePath
-setup propellorbin propellorbinpath dest = checkAlreadyShimmed propellorbin $ do
+setup propellorbin propellorbinpath dest = checkAlreadyShimmed shim $ do
createDirectoryIfMissing True dest
libs <- parseLdd <$> readProcess "ldd" [propellorbin]
@@ -40,7 +39,6 @@ setup propellorbin propellorbinpath dest = checkAlreadyShimmed propellorbin $ do
fromMaybe (error "cannot find gconv directory") $
headMaybe $ filter ("/gconv/" `isInfixOf`) glibclibs
let linkerparams = ["--library-path", intercalate ":" libdirs ]
- let shim = file propellorbin dest
writeFile shim $ unlines
[ shebang
, "GCONV_PATH=" ++ shellEscape gconvdir
@@ -50,6 +48,8 @@ setup propellorbin propellorbinpath dest = checkAlreadyShimmed propellorbin $ do
]
modifyFileMode shim (addModes executeModes)
return shim
+ where
+ shim = file propellorbin dest
shebang :: String
shebang = "#!/bin/sh"