fix check for already existing shim
Was not checking the shim file, oops.
This commit is contained in:
parent
8d971b83ba
commit
c7bc34d256
|
@ -20,7 +20,7 @@ import System.Posix.Files
|
||||||
-- Propellor may be running from an existing shim, in which case it's
|
-- Propellor may be running from an existing shim, in which case it's
|
||||||
-- simply reused.
|
-- simply reused.
|
||||||
setup :: FilePath -> Maybe FilePath -> FilePath -> IO FilePath
|
setup :: FilePath -> Maybe FilePath -> FilePath -> IO FilePath
|
||||||
setup propellorbin propellorbinpath dest = checkAlreadyShimmed propellorbin $ do
|
setup propellorbin propellorbinpath dest = checkAlreadyShimmed shim $ do
|
||||||
createDirectoryIfMissing True dest
|
createDirectoryIfMissing True dest
|
||||||
|
|
||||||
libs <- parseLdd <$> readProcess "ldd" [propellorbin]
|
libs <- parseLdd <$> readProcess "ldd" [propellorbin]
|
||||||
|
@ -39,7 +39,6 @@ setup propellorbin propellorbinpath dest = checkAlreadyShimmed propellorbin $ do
|
||||||
fromMaybe (error "cannot find gconv directory") $
|
fromMaybe (error "cannot find gconv directory") $
|
||||||
headMaybe $ filter ("/gconv/" `isInfixOf`) glibclibs
|
headMaybe $ filter ("/gconv/" `isInfixOf`) glibclibs
|
||||||
let linkerparams = ["--library-path", intercalate ":" libdirs ]
|
let linkerparams = ["--library-path", intercalate ":" libdirs ]
|
||||||
let shim = file propellorbin dest
|
|
||||||
writeFile shim $ unlines
|
writeFile shim $ unlines
|
||||||
[ shebang
|
[ shebang
|
||||||
, "GCONV_PATH=" ++ shellEscape gconvdir
|
, "GCONV_PATH=" ++ shellEscape gconvdir
|
||||||
|
@ -49,6 +48,8 @@ setup propellorbin propellorbinpath dest = checkAlreadyShimmed propellorbin $ do
|
||||||
]
|
]
|
||||||
modifyFileMode shim (addModes executeModes)
|
modifyFileMode shim (addModes executeModes)
|
||||||
return shim
|
return shim
|
||||||
|
where
|
||||||
|
shim = file propellorbin dest
|
||||||
|
|
||||||
shebang :: String
|
shebang :: String
|
||||||
shebang = "#!/bin/sh"
|
shebang = "#!/bin/sh"
|
||||||
|
|
Loading…
Reference in New Issue