From 8fe8ff000d48460583f542b932d8af3e3d3ae008 Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Sat, 12 Jan 2019 03:57:39 -0800 Subject: fixed bug in sed commands --- deploy-osx.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/deploy-osx.sh b/deploy-osx.sh index 0be5aa3..dd9efcd 100755 --- a/deploy-osx.sh +++ b/deploy-osx.sh @@ -4,18 +4,23 @@ # copy in libraries and set (most) library paths macdeployqt tikzit.app -# macdeployqt misses this path for some reason, so fix it +# macdeployqt doesn't fix the path to libpoppler for some reason, so we do it by hand cd tikzit.app/Contents/Frameworks POPPLER_QT=`ls libpoppler-qt*` -POPPLER_PATH=`otool -L $POPPLER_QT | sed -e 's!.*\(/usr.*\(libpoppler\..*dylib\)\).*!\1!p'` -POPPLER_LIB=`otool -L $POPPLER_QT | sed -e 's!.*\(/usr.*\(libpoppler\..*dylib\)\).*!\2!p'` +POPPLER_PATH=`otool -L $POPPLER_QT | sed -n 's!.*\(/usr.*\(libpoppler\..*dylib\)\).*!\1!p'` +POPPLER_LIB=`otool -L $POPPLER_QT | sed -n 's!.*\(/usr.*\(libpoppler\..*dylib\)\).*!\2!p'` echo "Found $POPPLER_QT and $POPPLER_LIB" -echo "Replacing $POPPLER_PATH with relative path..." -install_name_tool -id "@executable_path/../Frameworks/$POPPLER_LIB" $POPPLER_LIB -install_name_tool -change $POPPLER_PATH "@executable_path/../Frameworks/$POPPLER_LIB" $POPPLER_QT +if [ "$POPPLER_PATH" != "" ]; then + echo "Replacing $POPPLER_PATH with relative path..." + install_name_tool -id "@executable_path/../Frameworks/$POPPLER_LIB" $POPPLER_LIB + install_name_tool -change $POPPLER_PATH "@executable_path/../Frameworks/$POPPLER_LIB" $POPPLER_QT +else + echo "Poppler already has relative path, so nothing to do." +fi + cd ../../.. -- cgit v1.2.3