diff options
author | Joey Hess <joey@kitenet.net> | 2013-12-16 20:47:48 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-12-16 20:47:48 -0400 |
commit | 2e11edcfe4a6f5d82289c6ecb3efe73b9f39afed (patch) | |
tree | 37d6c9d73642fa096c18eeeeb10a5415386b255d /Makefile | |
parent | fb13aaf640de68e3fdaf7dae92dfcd67855b65f8 (diff) |
work around git path-defying behavior that broke "git annex" in standalone tarball, while "git-annex" worked
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -143,13 +143,16 @@ linuxstandalone: Build/Standalone find $(LINUXSTANDALONE_DEST) -type d -name gconv | head -n 1 | sed 's!$(LINUXSTANDALONE_DEST)/*!!' > $(LINUXSTANDALONE_DEST)/gconvdir find $(LINUXSTANDALONE_DEST) | grep ld-linux | head -n 1 | sed 's!$(LINUXSTANDALONE_DEST)/*!!' > $(LINUXSTANDALONE_DEST)/linker - # Install linker shim for each binary. + # Install linker shim for each binary. Note that each binary is put + # in its own separate directory, to avoid eg git looking for + # binaries in its directory rather than in PATH. for file in $$(find "$(LINUXSTANDALONE_DEST)" -type f); do \ if file "$$file" | grep ELF | grep -q executable; then \ - mkdir -p "$(LINUXSTANDALONE_DEST)/shimmed"; \ - mv "$$file" "$(LINUXSTANDALONE_DEST)/shimmed"; \ + base=$$(basename "$$file"); \ + mkdir -p "$(LINUXSTANDALONE_DEST)/shimmed/$$base"; \ + mv "$$file" "$(LINUXSTANDALONE_DEST)/shimmed/$$base/"; \ echo "#!/bin/sh" > "$$file"; \ - echo "exec \"\$$GIT_ANNEX_LINKER\" --library-path \"\$$GIT_ANNEX_LD_LIBRARY_PATH\" \"\$$GIT_ANNEX_SHIMMED/$$(basename "$$file")\" \"\$$@\"" >> "$$file"; \ + echo "exec \"\$$GIT_ANNEX_LINKER\" --library-path \"\$$GIT_ANNEX_LD_LIBRARY_PATH\" \"\$$GIT_ANNEX_SHIMMED/$$base/$$base\" \"\$$@\"" >> "$$file"; \ chmod +x "$$file"; \ fi; \ done |