mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Only try to change shell on interactive sessions.
This commit is contained in:
@@ -5,10 +5,12 @@ set errexit
|
||||
|
||||
function prerequisites {
|
||||
if which zsh > /dev/null ; then
|
||||
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
|
||||
echo "ZSH not found!" >&2
|
||||
|
||||
Reference in New Issue
Block a user