Created
February 25, 2020 02:01
-
-
Save singalen/ba84d4260b29d4f9bd199fa275d87c11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function package_deps() { | |
BINARY=$1 | |
DEPS=$(otool -L $BINARY \ | |
| grep "/opt/local/lib" \ | |
| tr -s ' ' \ | |
| cut -d ' ' -f 1) | |
for DEP in $DEPS; do | |
cp $DEP Far2l.app/Contents/MacOS/ | |
BASE_DEP=$(basename $DEP) | |
install_name_tool -change $DEP "@loader_path/$BASE_DEP" $BINARY | |
done | |
echo "Done with $BINARY:" | |
otool -L $BINARY | |
} | |
cp -f far2l/cmake-build-debug/install/far2l Far2l.app/Contents/MacOS/ | |
cp -rf far2l/cmake-build-debug/install/Plugins Far2l.app/Contents/MacOS/ | |
package_deps Far2l.app/Contents/MacOS/far2l | |
for PLUG in Far2l.app/Contents/MacOS/Plugins/*/plug/*.far-plug*; do | |
package_deps $PLUG | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment