Skip to content

Commit

Permalink
Reorder Xcode CLI Tools and accept Rosetta install
Browse files Browse the repository at this point in the history
  • Loading branch information
younglim authored Mar 14, 2023
1 parent 07203db commit c37e1fb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/hats_shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c37e1fb

Please sign in to comment.