Better fix for standalone tarball git-annex sync linker shim bug, that works for "git annex sync" as well as "git-annex sync".

This commit is contained in:
Joey Hess 2015-03-27 16:06:50 -04:00
parent 48bc2b9e54
commit 00b07d7155
3 changed files with 9 additions and 3 deletions

View file

@ -69,6 +69,8 @@ installLinkerShim top linker exe = do
createSymbolicLink link (top </> exelink)
writeFile exe $ unlines
[ "#!/bin/sh"
, "GIT_ANNEX_PROGRAMPATH=\"$0\""
, "export GIT_ANNEX_PROGRAMPATH"
, "exec \"$GIT_ANNEX_DIR/" ++ exelink ++ "\" --library-path \"$GIT_ANNEX_LD_LIBRARY_PATH\" \"$GIT_ANNEX_DIR/shimmed/" ++ base ++ "/" ++ base ++ "\" \"$@\""
]
modifyFileMode exe $ addModes executeModes