From c37e1fb610b163a57766207faca7d270148dfc97 Mon Sep 17 00:00:00 2001 From: younglim Date: Tue, 14 Mar 2023 21:08:08 +0800 Subject: [PATCH] Reorder Xcode CLI Tools and accept Rosetta install --- scripts/hats_shell.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/hats_shell.sh b/scripts/hats_shell.sh index e679e5b5..b141fff0 100644 --- a/scripts/hats_shell.sh +++ b/scripts/hats_shell.sh @@ -8,20 +8,20 @@ if [ ${PWD##*/} = "scripts" ]; then cd .. fi +if ! command -v python3 &> /dev/null +then + echo "Installing Xcode CLI Tools" + xcode-select --install +fi + if [[ $(uname -m) == 'arm64' ]]; then export ROSETTA2_STATUS_RESULT=$(/usr/bin/pgrep -q oahd && echo true || echo false) if ! $ROSETTA2_STATUS_RESULT; then echo "Installing Rosetta 2 dependency" - /usr/sbin/softwareupdate --install-rosetta + /usr/sbin/softwareupdate --install-rosetta --agree-to-license fi fi -if ! command -v python3 &> /dev/null -then - echo "Installing Xcode CLI Tools" - xcode-select --install -fi - echo "INFO: Setting path to node for this session" if [[ $(uname -m) == 'arm64' ]]; then export PATH_TO_NODE="$(pwd)/nodejs-mac-arm64/bin"