blob: 162845626e9037b5ab6f2a6084d391a84cdeca28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/sh
test -n "$1" || exit 1
dir="$1"
for i in "$dir"/*; do
echo $i
{ test -f "$i"; } || continue
case "$i" in
*.dll|*.exe) continue ;;
*) : ;;
esac
echo ---- $i ----
install_name_tool -id "@executable_path/$(echo "$i" | sed -e "s,^$dir/,,")" "$i"
otool -L "$i" | awk '{ print $1 }' |
while read l; do
j="$(basename -- "$l")"
echo === $j ===
if test -e "$dir/$j"; then
install_name_tool -change "$l" "@rpath/$j" "$i"
fi
done
done
|