helm/shell/+zsh/install

29 lines
834 B
Plaintext
Raw Normal View History

2016-10-19 07:56:37 -07:00
#!/bin/bash
2016-12-06 09:40:17 -08:00
if [[ "$SHELL" != *zsh ]]; then
2016-10-19 07:56:37 -07:00
case "$OSTYPE" in
darwin*)
brew install zsh fasd
2016-10-19 07:56:37 -07:00
# Add homebrewed zsh to /etc/shells
2016-12-06 09:40:17 -08:00
if ! grep '/usr/local/bin/zsh' /etc/shells >/dev/null; then
sudo tee -a /etc/shells <<< "/usr/local/bin/zsh"
2016-10-19 07:56:37 -07:00
fi
# Don't mess with my PATH!
sudo mv /etc/zprofile /etc/zprofile.disabled
2016-10-19 07:56:37 -07:00
;;
linux*)
if [[ -f /etc/arch-release ]]; then
sudo pacman --needed --noconfirm -S zsh fasd
elif [[ -f /etc/debian_version ]]; then
2017-04-23 21:26:33 -07:00
sudo add-apt-repository ppa:aacebedo/fasd
sudo apt-get update
sudo apt-get install -y zsh fasd
2016-10-19 07:56:37 -07:00
fi
;;
esac
2017-05-05 00:53:17 -07:00
sudo chsh -s $(which zsh) $(whoami)
2016-10-19 07:56:37 -07:00
fi