From 91ba6d98875c70d0736fd3eecd0ee4aae52cdc74 Mon Sep 17 00:00:00 2001 From: Mathieu Comandon Date: Thu, 21 Aug 2014 12:47:48 +0200 Subject: [PATCH] Don't try running chsh if user already runs zsh --- tools/install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index fc7ad70cf..fc0a9fa64 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -32,8 +32,10 @@ sed -i -e "/export PATH=/ c\\ export PATH=\"$PATH\" " ~/.zshrc -echo "\033[0;34mTime to change your default shell to zsh!\033[0m" -chsh -s `which zsh` +if [ "$SHELL" != "$(which zsh)" ]; then + echo "\033[0;34mTime to change your default shell to zsh!\033[0m" + chsh -s `which zsh` +fi echo "\033[0;32m"' __ __ '"\033[0m" echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m"