summaryrefslogtreecommitdiff
path: root/TestScripts
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2021-03-11 00:01:07 -0500
committerJeffrey Walton <noloader@gmail.com>2021-03-11 00:01:07 -0500
commit8be6b5ec986b94ece2f9cf1f9e5483f1a237177a (patch)
treeccb620e095ffd38993de01e6d2cbdf4f406a05c2 /TestScripts
parent2b2fdba308ebecc8e224e5bd9afb9c4bc8dc845a (diff)
downloadcryptopp-git-8be6b5ec986b94ece2f9cf1f9e5483f1a237177a.tar.gz
Update setenv-ios.sh script
Diffstat (limited to 'TestScripts')
-rwxr-xr-xTestScripts/setenv-ios.sh14
-rwxr-xr-xTestScripts/setenv-macos.sh2
2 files changed, 8 insertions, 8 deletions
diff --git a/TestScripts/setenv-ios.sh b/TestScripts/setenv-ios.sh
index 6b49d34b..8731bfd3 100755
--- a/TestScripts/setenv-ios.sh
+++ b/TestScripts/setenv-ios.sh
@@ -274,14 +274,14 @@ fi
IOS_CXXFLAGS="-arch ${IOS_CPU} ${MIN_VER}"
IOS_SYSROOT="${XCODE_DEVELOPER_SDK}/${XCODE_SDK}"
-if [ -z "${IOS_SYSROOT}" ] || [ ! -d "${IOS_SYSROOT}" ]; then
+if [ ! -d "${IOS_SYSROOT}" ]; then
echo "ERROR: unable to find Xcode sysroot."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# The simulators need to disable ASM. They don't receive arch flags.
# https://github.com/weidai11/cryptopp/issues/635
-if [[ "${IOS_SDK}" == "iPhoneSimulator" || "${IOS_SDK}" == "AppleTVSimulator" || "${IOS_SDK}" == "WatchSimulator" ]]; then
+if [[ "${IOS_SDK}" == *"Simulator" ]]; then
IOS_CPPFLAGS="$IOS_CPPFLAGS -DCRYPTOPP_DISABLE_ASM"
fi
@@ -332,18 +332,18 @@ fi
# Add tools to head of path, if not present already
LENGTH=${#XCODE_TOOLCHAIN}
SUBSTR=${PATH:0:$LENGTH}
-if [ "$SUBSTR" != "${XCODE_TOOLCHAIN}" ]; then
- export PATH="${XCODE_TOOLCHAIN}:$PATH"
+if [ "${SUBSTR}" != "${XCODE_TOOLCHAIN}" ]; then
+ export PATH="${XCODE_TOOLCHAIN}:${PATH}"
fi
#####################################################################
VERBOSE=${VERBOSE:-1}
if [ "$VERBOSE" -gt 0 ]; then
- echo "XCODE_TOOLCHAIN: $XCODE_TOOLCHAIN"
- echo "IOS_SDK: $IOS_SDK"
+ echo "XCODE_TOOLCHAIN: ${XCODE_TOOLCHAIN}"
+ echo "IOS_SDK: ${IOS_SDK}"
echo "IOS_CPU: ${IOS_CPU}"
- echo "IOS_SYSROOT: $IOS_SYSROOT"
+ echo "IOS_SYSROOT: ${IOS_SYSROOT}"
if [ -n "${IOS_CPPFLAGS}" ]; then
echo "IOS_CPPFLAGS: ${IOS_CPPFLAGS}"
fi
diff --git a/TestScripts/setenv-macos.sh b/TestScripts/setenv-macos.sh
index 7413f015..70c657ff 100755
--- a/TestScripts/setenv-macos.sh
+++ b/TestScripts/setenv-macos.sh
@@ -290,7 +290,7 @@ fi
MACOS_CXXFLAGS="-arch $MACOS_CPU $MIN_VER ${MACOS_STDLIB}"
MACOS_SYSROOT="${XCODE_DEVELOPER_SDK}/${XCODE_SDK}"
-if [ -z "${MACOS_SYSROOT}" ] || [ ! -d "${MACOS_SYSROOT}" ]; then
+if [ ! -d "${MACOS_SYSROOT}" ]; then
echo "ERROR: unable to find Xcode sysroot."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi