]>
Commit | Line | Data |
---|---|---|
3412ed51 | 1 | #!/bin/sh |
2 | ||
3 | binaries=("komodo-cli" "komodod") | |
4 | ||
5 | for binary in "${binaries[@]}"; | |
6 | do | |
7 | # find the dylibs to copy for komodod | |
8 | DYLIBS=`otool -L src/$binary | grep "/usr/local" | awk -F' ' '{ print $1 }'` | |
9 | echo "copying $DYLIBS to $src" | |
10 | # copy the dylibs to the srcdir | |
11 | for dylib in $DYLIBS; do cp -rf $dylib src/; done | |
12 | ||
13 | # modify komodod to point to dylibs | |
14 | echo "modifying $binary to use local libraries" | |
15 | for dylib in $DYLIBS; do install_name_tool -change $dylib @executable_path/`basename $dylib` src/$binary; done; | |
16 | chmod +x src/$binary | |
17 | done |