From 74453da3e1cb111b8d6a930e2daa210af364342b Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Thu, 27 Oct 2022 16:35:32 +0200 Subject: [PATCH] Fix compatibility with old bash versions --- build_dependencies.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build_dependencies.sh b/build_dependencies.sh index 1ed92267..254c676a 100755 --- a/build_dependencies.sh +++ b/build_dependencies.sh @@ -34,7 +34,7 @@ function Help echo " other ports, vcpkg-specific options, etc." } -if [[ -n "${VCPKG_ROOT+x}" ]]; then +if [[ -n "${VCPKG_ROOT+unset}" ]]; then unset VCPKG_ROOT fi @@ -92,7 +92,7 @@ do done # check if CC is not set or a null string -if [[ ! -v "CC" || -z "${CC}" ]]; then +if [[ -z "${CC+unset}" || -z "${CC}" ]]; then if type clang &>/dev/null; then export CC="${CC:-$(which clang)}" msg "Using default clang as CC=${CC}" @@ -104,7 +104,7 @@ else fi # check if CXX is not set or a null string -if [[ ! -v "CXX" || -z "${CXX}" ]]; then +if [[ -z "${CXX+unset}" || -z "${CXX}" ]]; then if type clang++ &>/dev/null; then export CXX="${CXX:-$(which clang++)}" msg "Using default clang++ as CXX=${CXX}" @@ -154,7 +154,7 @@ else fi host_triplet="${triplet_arch}-${triplet_os}-rel" -if [[ -v TARGET_ARCH ]]; then +if [[ -n ${TARGET_ARCH+unset} ]]; then triplet_arch=${TARGET_ARCH} fi target_triplet="${triplet_arch}-${triplet_os}"