From 40239c90d0ff77524de18f557511b6f373016c05 Mon Sep 17 00:00:00 2001 From: Roberto Bermejo Martinez Date: Mon, 18 Apr 2022 11:59:33 +0200 Subject: [PATCH] Using different paths for M1 or Intel processor --- scripts/shell/zsh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/shell/zsh b/scripts/shell/zsh index 65714827b..e8ed8a433 100755 --- a/scripts/shell/zsh +++ b/scripts/shell/zsh @@ -22,14 +22,19 @@ case $1 in "$DOTLY_PATH/bin/dot" shell zsh reload_completions ;; "test_performance") + if [[ $(uname -m) == 'arm64' ]]; then + ZSH_BIN_PATH='/opt/homebrew/bin/zsh' + else + ZSH_BIN_PATH='/usr/local/bin/zsh' + fi script::depends_on hyperfine - hyperfine '/bin/zsh -i -c exit' '/opt/homebrew/bin/zsh -i -c exit' --warmup 1 + hyperfine '/bin/zsh -i -c exit' "${ZSH_BIN_PATH} -i -c exit" --warmup 1 echo "" echo "ZSH INFO:" echo " 🍎 macOS ZSH 📂 /bin/zsh - $(/bin/zsh --version)" - echo " 🍺 Brew ZSH 📂 /opt/homebrew/bin/zsh - $(/opt/homebrew/bin/zsh --version)" + echo " 🍺 Brew ZSH 📂 ${ZSH_BIN_PATH} - $(${ZSH_BIN_PATH} --version)" echo "" echo "✨ Currently using $(command -v zsh) ✨"