summaryrefslogtreecommitdiff
path: root/ide/MacOS/relatify_with-respect-to_.sh
blob: a24af93958343787b72b8856810cbc2ed8a91363 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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