From 0a049afced0407b65bc8e8d348fcb3be2ae8b5c5 Mon Sep 17 00:00:00 2001 From: Bradley Sepos Date: Wed, 27 Dec 2017 13:40:07 -0500 Subject: [PATCH] scripts: Export prefix bin path while building Mac deps. Fixes #1075. --- scripts/mac-toolchain-build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/mac-toolchain-build b/scripts/mac-toolchain-build index b175b61c1..6bed4e861 100755 --- a/scripts/mac-toolchain-build +++ b/scripts/mac-toolchain-build @@ -38,6 +38,8 @@ if [[ ! -w "${PREFIX}" ]]; then fi fi PREFIX=$(cd "${PREFIX}" && pwd -P) +PATH_ORIG="${PATH}" +export PATH="${PREFIX}/bin${PATH:+:$PATH}" # temp dir TEMP_DIR=$(mktemp -d "${TMPDIR:-/tmp/}toolchain-XXXXXX") @@ -142,4 +144,8 @@ if [[ "${PREFIX}" != "/usr/local" ]]; then echo " add to your shell startup script (${HOME}/.bash_profile):" echo " export PATH=\"${PREFIX}/bin:\${PATH}\"" fi + +# restore original PATH +PATH="${PATH_ORIG}" + exit 0 -- 2.40.0