From 8be6b5ec986b94ece2f9cf1f9e5483f1a237177a Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Thu, 11 Mar 2021 00:01:07 -0500 Subject: [PATCH] Update setenv-ios.sh script --- TestScripts/setenv-ios.sh | 14 +++++++------- TestScripts/setenv-macos.sh | 2 +- 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