Skip to content

Commit 1ba71d9

Browse files
authored
Merge branch 'master' into master
2 parents 058ca1b + 4d033de commit 1ba71d9

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

installer/utils/mac_utils.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export BUNDLE_CONTENTS=$PWD/../data/$PRODUCT_DISPLAYED_NAME.app/Contents/
66
export LIB_PATH=@executable_path/../Lib
77

88
function fix_dependencies {
9-
set -ueo pipefail
9+
set -ueox pipefail
1010
local target="$1"
1111
pushd "$(dirname "$target")"
1212
local prefix=$(grealpath -e "$2")
@@ -25,15 +25,17 @@ function fix_dependencies {
2525
if [[ "$dep" == /System/Library/Frameworks/* || "$dep" == /usr/lib/* || "$dep" == "$install_name" ]] ; then
2626
continue;
2727
fi
28-
thislibdir=$(dirname "$dep")
29-
normalized=$(grealpath -e --relative-to "$thislibdir" "$dep")
30-
if [[ $? != 0 ]] ; then
31-
echo "Failed to normalize path \"$dep\" relative to \"$thislibdir\" for prefix \"$prefix\" in working directory \"$PWD\""
32-
fi
28+
29+
normalized=$(grealpath -e "$dep")
30+
if [[ "$normalized" == "/usr/local"/* ]] ; then
31+
relative=$(basename "$normalized")
32+
fi
33+
3334
if [[ "$normalized" == "$prefix"/* ]] ; then
3435
relative=$(grealpath -e --relative-to "$prefix" "$normalized")
35-
change="$change -change \"$dep\" \"$subst/$relative\""
3636
fi
37+
38+
change="$change -change \"$dep\" \"$subst/$relative\""
3739
done
3840
popd
3941
if [[ -n "$change" ]] ; then

0 commit comments

Comments
 (0)