diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-11-24 05:58:23 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-11-24 05:58:23 +0100 |
commit | 9490813ba7283a5f4caf178808907177357cd5c8 (patch) | |
tree | f90d61142fa0705535afa8977649ea73d35de848 /install-fail-tool | |
parent | e058bd379f452ba7ecce64625c4438279a668ba4 (diff) |
initial version of the rpath fixer for osx
Diffstat (limited to 'install-fail-tool')
-rwxr-xr-x | install-fail-tool | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/install-fail-tool b/install-fail-tool new file mode 100755 index 00000000..910d9cc4 --- /dev/null +++ b/install-fail-tool @@ -0,0 +1,19 @@ +#!/bin/sh + +test -n "$1" || exit 1 + +dir="$1" + +for i in "$dir"/*.dylib; do + echo ---- $i ---- + + install_name_tool -id "@executable_path/$(basename -- "$i")" "$i" + + otool -L "$i" | awk '$1 ~ /\.dylib$/ { print $1 }' | + while read l; do + j="$(basename -- "$l")" + if test -e "$dir/$j"; then + install_name_tool -change "$l" "@executable_path/$j" "$i" + fi + done +done |