diff options
author | Ungureanu Marius <marius.ungureanu@xamarin.com> | 2015-04-27 14:56:00 +0300 |
---|---|---|
committer | Ungureanu Marius <marius.ungureanu@xamarin.com> | 2015-04-27 14:56:00 +0300 |
commit | 4da43d4bd9f97001c6d89b353075b28612fe64a6 (patch) | |
tree | 7681313c2fa0408175f5600171d02eed6e29b0c1 | |
parent | 65d641c93f5392c151788ebb466932b5c6181a75 (diff) |
[Mac] Add script to fix loader paths.
-rwxr-xr-x | fixify.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fixify.sh b/fixify.sh new file mode 100755 index 0000000..9b9f929 --- /dev/null +++ b/fixify.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# This script is used to make dylibs installed for /usr/local be portable. + +# Change this to be the path to the dylibs. +LIBRARY_DIR=mac + +pushd $LIBRARY_DIR +for i in *; do + install_name_tool -id "$i" "$i" + for j in *; do + test "$i" == "$j" && continue + install_name_tool -change "/usr/local/lib/$j" "@loader_path/$j" "$i" + done +done +popd + |