diff --git a/TestScripts/cryptest-autotools.sh b/TestScripts/cryptest-autotools.sh index 84ec59b0..1ed62590 100755 --- a/TestScripts/cryptest-autotools.sh +++ b/TestScripts/cryptest-autotools.sh @@ -2,7 +2,7 @@ PWD_DIR=$(pwd) function cleanup { - cd "$PWD_DIR" + cd "$PWD_DIR" } trap cleanup EXIT @@ -122,8 +122,9 @@ chmod +w config.sub mv config.sub.new config.sub chmod +x config.sub -if [[ "$IS_DARWIN" -ne 0 ]]; then - xattrib -r com.apple.quarantine config.sub &>/dev/null +if [[ "$IS_DARWIN" -ne 0 ]] && [[ -n $(command -v xattr) ]]; then + echo "Removing config.sub quarantine" + xattr -d "com.apple.quarantine" config.sub &>/dev/null fi echo "Updating config.guess" @@ -134,8 +135,9 @@ chmod +w config.guess mv config.guess.new config.guess chmod +x config.guess -if [[ "$IS_DARWIN" -ne 0 ]]; then - xattrib -r com.apple.quarantine config.guess &>/dev/null +if [[ "$IS_DARWIN" -ne 0 ]] && [[ -n $(command -v xattr) ]]; then + echo "Removing config.guess quarantine" + xattr -d "com.apple.quarantine" config.guess &>/dev/null fi #############################################################################