]>
Commit | Line | Data |
---|---|---|
112dc7b1 JB |
1 | #!/bin/sh |
2 | ||
3 | TMP_DIR=~/tmp/komodo | |
4 | ||
5 | # make a tmp directory | |
6 | mkdir -p $TMP_DIR | |
7 | echo "making $TMP_DIR" | |
8 | ||
9 | binaries=("komodo-cli" "komodod") | |
10 | ||
11 | for binary in "${binaries[@]}"; | |
12 | do | |
13 | echo "copying $binary to $TMP_DIR" | |
14 | ||
15 | cp src/$binary $TMP_DIR | |
16 | ||
17 | # find the dylibs to copy for komodod | |
18 | DYLIBS=`otool -L $TMP_DIR/$binary | grep "/usr/local" | awk -F' ' '{ print $1 }'` | |
19 | echo "copying $DYLIBS to $TMP_DIR" | |
20 | ||
21 | # copy the dylibs to the tmpdir | |
22 | for dylib in $DYLIBS; do cp -rf $dylib $TMP_DIR/; done | |
23 | ||
24 | # modify komodod to point to dylibs | |
25 | echo "modifying $binary to use local libraries" | |
26 | for dylib in $DYLIBS; do install_name_tool -change $dylib @executable_path/`basename $dylib` $TMP_DIR/$binary; done; | |
27 | done | |
28 | ||
29 | ||
30 | ||
31 | ||
32 | ||
33 | ||
34 | ||
35 |