You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
706 B
27 lines
706 B
#!/bin/sh
|
|
|
|
TMP_DIR=~/tmp/iguana
|
|
|
|
# make a tmp directory
|
|
mkdir -p $TMP_DIR
|
|
echo "making $TMP_DIR"
|
|
|
|
binaries=("iguana")
|
|
|
|
for binary in "${binaries[@]}";
|
|
do
|
|
echo "copying $binary to $TMP_DIR"
|
|
|
|
cp agents/$binary $TMP_DIR
|
|
|
|
# find the dylibs to copy for iguana
|
|
DYLIBS=`otool -L $TMP_DIR/$binary | grep "/usr/local" | awk -F' ' '{ print $1 }'`
|
|
echo "copying $DYLIBS to $TMP_DIR"
|
|
|
|
# copy the dylibs to the tmpdir
|
|
for dylib in $DYLIBS; do cp -rf $dylib $TMP_DIR/; done
|
|
|
|
# modify iguana to point to dylibs
|
|
echo "modifying $binary to use local libraries"
|
|
for dylib in $DYLIBS; do install_name_tool -change $dylib @executable_path/`basename $dylib` $TMP_DIR/$binary; done;
|
|
done
|
|
|