9 binaries=("komodo-cli" "komodod")
11 for binary in "${binaries[@]}";
13 echo "copying $binary to $TMP_DIR"
15 cp src/$binary $TMP_DIR
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"
21 # copy the dylibs to the tmpdir
22 for dylib in $DYLIBS; do cp -rf $dylib $TMP_DIR/; done
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;