Skip to content

Commit

Permalink
Fix compatibility with old bash versions (#985)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexodia authored Oct 28, 2022
1 parent 1badaad commit ad3a3cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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}"
Expand All @@ -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}"
Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit ad3a3cf

Please sign in to comment.