Hush Full Node software. We were censored from Github, this is where all development happens now.
https://hush.is
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.
95 lines
3.5 KiB
95 lines
3.5 KiB
7 years ago
|
#!/bin/sh
|
||
6 years ago
|
|
||
|
KMD_DIR=kmd/mac/verus-cli
|
||
6 years ago
|
|
||
6 years ago
|
binaries=("komodo-cli" "komodod")
|
||
6 years ago
|
alllibs=()
|
||
6 years ago
|
for binary in "${binaries[@]}";
|
||
|
do
|
||
6 years ago
|
# do the work in the destination directory
|
||
|
cp src/$binary $KMD_DIR
|
||
|
# find the dylibs to copy for komodod
|
||
|
DYLIBS=`otool -L $KMD_DIR/$binary | grep "/usr/local" | awk -F' ' '{ print $1 }'`
|
||
6 years ago
|
echo "copying $DYLIBS to $KMD_DIR"
|
||
6 years ago
|
# copy the dylibs to the srcdir
|
||
6 years ago
|
for dylib in $DYLIBS; do cp -rf $dylib $KMD_DIR; done
|
||
6 years ago
|
#DYLIBS=`otool -L $KMD_DIR/$binary | grep "/usr/lib" | awk -F' ' '{ print $1 }'`
|
||
|
# copy the other dylibs to the srcdir
|
||
|
#for dylib in $DYLIBS; do cp -rf $dylib $KMD_DIR; alllibs+=($dylib); done
|
||
6 years ago
|
done
|
||
6 years ago
|
|
||
6 years ago
|
libraries=("libgcc_s.1.dylib" "libgomp.1.dylib" "libidn2.0.dylib" "libstdc++.6.dylib")
|
||
6 years ago
|
|
||
|
for binary in "${libraries[@]}";
|
||
|
do
|
||
|
# Need to undo this for the dylibs when we are done
|
||
6 years ago
|
chmod 755 $KMD_DIR/$binary
|
||
6 years ago
|
# find the dylibs to copy for komodod
|
||
6 years ago
|
DYLIBS=`otool -L $KMD_DIR/$binary | grep "/usr/local" | awk -F' ' '{ print $1 }'`
|
||
6 years ago
|
echo "copying $DYLIBS to $KMD_DIR"
|
||
6 years ago
|
# copy the dylibs to the srcdir
|
||
6 years ago
|
for dylib in $DYLIBS; do cp -rf $dylib $KMD_DIR; alllibs+=($dylib); done
|
||
6 years ago
|
#DYLIBS=`otool -L $KMD_DIR/$binary | grep "/usr/lib" | awk -F' ' '{ print $1 }'`
|
||
|
# copy the other dylibs to the srcdir
|
||
|
#for dylib in $DYLIBS; do cp -rf $dylib $KMD_DIR; alllibs+=($dylib); newlibs+=(`basename $dylib`); done
|
||
6 years ago
|
done
|
||
|
|
||
6 years ago
|
indirectlibraries=("libintl.8.dylib" "libunistring.2.dylib")
|
||
6 years ago
|
|
||
6 years ago
|
newlibs=()
|
||
|
for binary in "${indirectlibraries[@]}"
|
||
6 years ago
|
do
|
||
|
# Need to undo this for the dylibs when we are done
|
||
|
chmod 755 src/$binary
|
||
|
# find the dylibs to copy for komodod
|
||
6 years ago
|
DYLIBS=`otool -L $KMD_DIR/$binary | grep "/usr/local" | awk -F' ' '{ print $1 }'`
|
||
6 years ago
|
echo "copying indirect $DYLIBS to $KMD_DIR"
|
||
|
# copy the dylibs to the dest dir
|
||
6 years ago
|
for dylib in $DYLIBS; do cp -rf $dylib $KMD_DIR; alllibs+=($dylib); done
|
||
|
#DYLIBS=`otool -L $KMD_DIR/$binary | grep "/usr/lib" | awk -F' ' '{ print $1 }'`
|
||
|
# copy the other dylibs to the srcdir
|
||
|
#for dylib in $DYLIBS; do cp -rf $dylib $KMD_DIR; alllibs+=($dylib); newlibs+=(`basename $dylib`); done
|
||
|
done
|
||
|
|
||
|
# now process all the new libs we found indirectly
|
||
|
for binary in "${newlibs[@]}";
|
||
|
do
|
||
|
# Need to undo this for the dylibs when we are done
|
||
|
chmod 755 src/$binary
|
||
|
# find the dylibs to copy for komodod
|
||
|
DYLIBS=`otool -L $KMD_DIR/$binary | grep "/usr/local" | awk -F' ' '{ print $1 }'`
|
||
|
echo "copying indirect $DYLIBS to $KMD_DIR"
|
||
|
# copy the dylibs to the dest dir
|
||
|
for dylib in $DYLIBS; do cp -rf $dylib $KMD_DIR; alllibs+=($dylib); done
|
||
|
#DYLIBS=`otool -L $KMD_DIR/$binary | grep "/usr/lib" | awk -F' ' '{ print $1 }'`
|
||
|
# copy the other dylibs to the srcdir
|
||
|
#for dylib in $DYLIBS; do cp -rf $dylib $KMD_DIR; alllibs+=($dylib); done
|
||
6 years ago
|
done
|
||
|
|
||
|
for binary in "${binaries[@]}";
|
||
|
do
|
||
6 years ago
|
# modify komododi or komodo-cli to point to dylibs
|
||
6 years ago
|
echo "modifying $binary to use local libraries"
|
||
6 years ago
|
for dylib in "${alllibs[@]}"
|
||
6 years ago
|
do
|
||
6 years ago
|
echo "Next lib is $dylib "
|
||
6 years ago
|
install_name_tool -change $dylib @executable_path/`basename $dylib` $KMD_DIR/$binary
|
||
|
done
|
||
|
chmod +x $KMD_DIR/$binary
|
||
|
done
|
||
6 years ago
|
|
||
6 years ago
|
libs=("${libraries[@]}" "${indirectlibraries[@]}" "${newlibs[@]}")
|
||
|
for binary in "${libs[@]}";
|
||
|
do
|
||
|
# modify dylibs to point to dylibs
|
||
|
echo "modifying $binary to use local libraries"
|
||
|
for dylib in "${alllibs[@]}"
|
||
|
do
|
||
|
echo "Next lib is $dylib "
|
||
|
chmod 755 $KMD_DIR/$binary
|
||
6 years ago
|
install_name_tool -change $dylib @executable_path/`basename $dylib` $KMD_DIR/$binary
|
||
|
done
|
||
6 years ago
|
chmod +x $KMD_DIR/$binary
|
||
6 years ago
|
done
|
||
|
|