summaryrefslogtreecommitdiff
path: root/ide/MacOS/relatify_with-respect-to_.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ide/MacOS/relatify_with-respect-to_.sh')
-rwxr-xr-xide/MacOS/relatify_with-respect-to_.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/ide/MacOS/relatify_with-respect-to_.sh b/ide/MacOS/relatify_with-respect-to_.sh
new file mode 100755
index 00000000..a24af939
--- /dev/null
+++ b/ide/MacOS/relatify_with-respect-to_.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+for i in "$3/"*.dylib
+do install_name_tool -change "$2"/$(basename $i) @executable_path/../Resources/lib/$(basename $i) "$1"
+done
+case "$1" in
+ *.dylib)
+ install_name_tool -id @executable_path/../Resources/lib/$(basename $1) $1
+ for i in "$3"/*.dylib
+ do install_name_tool -change "$2/"$(basename $1) @executable_path/../Resources/lib/$(basename $1) $i
+ done;;
+ *)
+esac