Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions installer/utils/mac_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export BUNDLE_CONTENTS=$PWD/../data/$PRODUCT_DISPLAYED_NAME.app/Contents/
export LIB_PATH=@executable_path/../Lib

function fix_dependencies {
set -ueo pipefail
set -ueox pipefail
local target="$1"
pushd "$(dirname "$target")"
local prefix=$(grealpath -e "$2")
Expand All @@ -25,10 +25,15 @@ function fix_dependencies {
continue;
fi
normalized=$(grealpath -e "$dep")
if [[ "$normalized" == "/usr/local"/* ]] ; then
relative=$(basename "$normalized")
fi

if [[ "$normalized" == "$prefix"/* ]] ; then
relative=$(grealpath -e --relative-to "$prefix" "$normalized")
change="$change -change \"$dep\" \"$subst/$relative\""
fi

change="$change -change \"$dep\" \"$subst/$relative\""
done
popd
if [[ -n "$change" ]] ; then
Expand Down
Loading