mirror of
https://github.com/Matir/skel.git
synced 2026-05-26 13:35:42 -07:00
Only try to change shell on interactive sessions.
This commit is contained in:
@@ -5,10 +5,12 @@ set errexit
|
|||||||
|
|
||||||
function prerequisites {
|
function prerequisites {
|
||||||
if which zsh > /dev/null ; then
|
if which zsh > /dev/null ; then
|
||||||
|
if [[ $- == *i* ]] ; then
|
||||||
if [[ `getent passwd $USER | cut -d: -f7` != */zsh ]] ; then
|
if [[ `getent passwd $USER | cut -d: -f7` != */zsh ]] ; then
|
||||||
echo 'Enter password to change shell.' >&2
|
echo 'Enter password to change shell.' >&2
|
||||||
chsh -s `which zsh`
|
chsh -s `which zsh`
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
install_git https://github.com/robbyrussell/oh-my-zsh.git $HOME/.oh-my-zsh
|
install_git https://github.com/robbyrussell/oh-my-zsh.git $HOME/.oh-my-zsh
|
||||||
else
|
else
|
||||||
echo "ZSH not found!" >&2
|
echo "ZSH not found!" >&2
|
||||||
|
|||||||
Reference in New Issue
Block a user