summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/mac-toolchain-build14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/mac-toolchain-build b/scripts/mac-toolchain-build
index fff0ac57f..b175b61c1 100755
--- a/scripts/mac-toolchain-build
+++ b/scripts/mac-toolchain-build
@@ -27,7 +27,7 @@ mkdir -p "${PREFIX}" >/dev/null 2>&1
if [[ ! -w "${PREFIX}" ]]; then
if ! sudo -n date >/dev/null 2>&1; then
echo "sudo is required to install files to ${PREFIX}"
- sudo -v
+ [[ "${SUDO}" != "" ]] && ${SUDO} -v
fi
sudo mkdir -p "${PREFIX}" >/dev/null 2>&1
if sudo touch "${PREFIX}" >/dev/null 2>&1; then
@@ -71,7 +71,7 @@ printf "Downloading [%02i/%02i] complete.\n" "${TOTAL}" "${TOTAL}"
# autoconf
cd "${TEMP_DIR}"
printf "Building [%02i/%02i] %s" "1" "${TOTAL}" "autoconf 2.69"
-sudo -v
+[[ "${SUDO}" != "" ]] && ${SUDO} -v
tar -xf autoconf-2.69.tar.gz >/dev/null 2>&1 || print_fail_and_exit
cd autoconf-2.69 >/dev/null 2>&1 || print_fail_and_exit
./configure --prefix="${PREFIX}" >../autoconf-2.69.log 2>&1 || print_fail_and_exit
@@ -82,7 +82,7 @@ echo -en "${CREL}"
# automake
cd "${TEMP_DIR}"
printf "Building [%02i/%02i] %s" "2" "${TOTAL}" "automake 1.15.1"
-sudo -v
+[[ "${SUDO}" != "" ]] && ${SUDO} -v
tar -xf automake-1.15.1.tar.gz >/dev/null 2>&1 || print_fail_and_exit
cd automake-1.15.1 >/dev/null 2>&1 || print_fail_and_exit
./configure --prefix="${PREFIX}" >../automake-1.15.1.log 2>&1 || print_fail_and_exit
@@ -93,7 +93,7 @@ echo -en "${CREL}"
# cmake
cd "${TEMP_DIR}"
printf "Building [%02i/%02i] %s\n" "3" "${TOTAL}" "cmake 3.9.6"
-sudo -v
+[[ "${SUDO}" != "" ]] && ${SUDO} -v
echo "You may safely dismiss and ignore any prompt to install Java."
tar -xf cmake-3.9.6.tar.gz >/dev/null 2>&1 || print_fail_and_exit
cd cmake-3.9.6 >/dev/null 2>&1 || print_fail_and_exit
@@ -104,7 +104,7 @@ ${SUDO} make install >../cmake-3.9.6.log 2>&1 || print_fail_and_exit
# libtool
cd "${TEMP_DIR}"
printf "Building [%02i/%02i] %s" "4" "${TOTAL}" "libtool 2.4.6"
-sudo -v
+[[ "${SUDO}" != "" ]] && ${SUDO} -v
tar -xf libtool-2.4.6.tar.gz >/dev/null 2>&1 || print_fail_and_exit
cd libtool-2.4.6 >/dev/null 2>&1 || print_fail_and_exit
./configure --prefix="${PREFIX}" >../libtool-2.4.6.log 2>&1 || print_fail_and_exit
@@ -115,7 +115,7 @@ echo -en "${CREL}"
# pkg-config
cd "${TEMP_DIR}"
printf "Building [%02i/%02i] %s" "5" "${TOTAL}" "pkg-config 0.29.2"
-sudo -v
+[[ "${SUDO}" != "" ]] && ${SUDO} -v
tar -xf pkg-config-0.29.2.tar.gz >/dev/null 2>&1 || print_fail_and_exit
cd pkg-config-0.29.2 >/dev/null 2>&1 || print_fail_and_exit
./configure --prefix="${PREFIX}" --with-internal-glib --disable-host-tool >../pkg-config-0.29.2.log 2>&1 || print_fail_and_exit
@@ -126,7 +126,7 @@ echo -en "${CREL}"
# yasm
cd "${TEMP_DIR}"
printf "Building [%02i/%02i] %s" "6" "${TOTAL}" "yasm 1.3.0"
-sudo -v
+[[ "${SUDO}" != "" ]] && ${SUDO} -v
tar -xf yasm-1.3.0.tar.gz >/dev/null 2>&1 || print_fail_and_exit
cd yasm-1.3.0 >/dev/null 2>&1 || print_fail_and_exit
./configure --prefix="${PREFIX}" >../yasm-1.3.0.log 2>&1 || print_fail_and_exit