helm/shell/zsh/install

26 lines
615 B
Plaintext
Raw Normal View History

2016-10-19 07:56:37 -07:00
#!/bin/bash
if [[ "$SHELL" != *zsh ]]
then
case "$OSTYPE" in
darwin*)
brew install zsh
# Add homebrewed zsh to /etc/shells
if ! grep '/usr/local/bin/zsh' /etc/shells >/dev/null;
then
sudo bash -c "echo '/usr/local/bin/zsh' >> /etc/shells"
fi
;;
linux*)
if [ -f /etc/arch-release ]; then
sudo pacman --noconfirm -S zsh
elif [ -f /etc/debian_version ]; then
sudo apt-get install zsh
fi
;;
esac
chsh -s $(which zsh)
fi