From 9c6de19f17bdb4f87046e0f7b8c7bcbc4ffb6aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Nordstr=C3=B8m?= Date: Fri, 8 Nov 2019 01:01:10 +0100 Subject: [PATCH] Replace hard-coded names of build directory in build_installer.sh script for macOS with looking at the location of the script by the script itself when it is run. This makes it possible to have differently named build dirs for debug and release builds, and without restricting what each of those directories must be named. --- dist/macos/bundle/build_installer.sh.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dist/macos/bundle/build_installer.sh.in b/dist/macos/bundle/build_installer.sh.in index 4565348d..d16e21f3 100755 --- a/dist/macos/bundle/build_installer.sh.in +++ b/dist/macos/bundle/build_installer.sh.in @@ -3,9 +3,10 @@ # change this to rename the installer package B_DMG="Barrier-@BARRIER_VERSION@.dmg" -cd @CMAKE_CURRENT_SOURCE_DIR@/build/bundle || exit 1 +cd "$( dirname '$0' )" +OWNDIR="$( pwd )" -B_REREF_SCRIPT=@CMAKE_CURRENT_SOURCE_DIR@/build/bundle/reref_dylibs.sh +B_REREF_SCRIPT="$OWNDIR/reref_dylibs.sh" if [ ! -x $B_REREF_SCRIPT ]; then echo Missing script: $B_REREF_SCRIPT exit 1