aboutsummaryrefslogtreecommitdiffstats
path: root/macos/shell.sh
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2026-12-05 12:20:28 -0800
committerEugene Triguba <hello@eugenetriguba.com>2026-12-05 12:20:28 -0800
commit0e3b511b39bbbb3e73deaa92bfb120beb252d46d (patch)
treecf5beedf22afa2bc147faa1e4bf0662063d271bb /macos/shell.sh
parentAdd init script (diff)
downloaddotfiles-0e3b511b39bbbb3e73deaa92bfb120beb252d46d.zip
Only attempt to update macos shell if it isn't oksh
Diffstat (limited to '')
-rwxr-xr-xmacos/shell.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/macos/shell.sh b/macos/shell.sh
index 116f907..7168513 100755
--- a/macos/shell.sh
+++ b/macos/shell.sh
@@ -2,6 +2,7 @@
set -o errexit
set -o nounset
-echo "$(brew --prefix)/bin/oksh" | sudo tee -a /etc/shells
-chsh -s "$(brew --prefix)/bin/oksh"
-
+if [ "$SHELL" != "$(brew --prefix)/bin/oksh" ]; then
+ echo "$(brew --prefix)/bin/oksh" | sudo tee -a /etc/shells
+ chsh -s "$(brew --prefix)/bin/oksh"
+fi