diff --git a/install.sh b/install.sh index 7352879..82005bb 100755 --- a/install.sh +++ b/install.sh @@ -5,9 +5,11 @@ set errexit function prerequisites { if which zsh > /dev/null ; then - if [[ `getent passwd $USER | cut -d: -f7` != */zsh ]] ; then - echo 'Enter password to change shell.' >&2 - chsh -s `which zsh` + if [[ $- == *i* ]] ; then + if [[ `getent passwd $USER | cut -d: -f7` != */zsh ]] ; then + echo 'Enter password to change shell.' >&2 + chsh -s `which zsh` + fi fi install_git https://github.com/robbyrussell/oh-my-zsh.git $HOME/.oh-my-zsh else