helm/shell/+zsh/install
2017-05-05 09:53:36 +02:00

29 lines
834 B
Bash
Executable file

#!/bin/bash
if [[ "$SHELL" != *zsh ]]; then
case "$OSTYPE" in
darwin*)
brew install zsh fasd
# Add homebrewed zsh to /etc/shells
if ! grep '/usr/local/bin/zsh' /etc/shells >/dev/null; then
sudo tee -a /etc/shells <<< "/usr/local/bin/zsh"
fi
# Don't mess with my PATH!
sudo mv /etc/zprofile /etc/zprofile.disabled
;;
linux*)
if [[ -f /etc/arch-release ]]; then
sudo pacman --needed --noconfirm -S zsh fasd
elif [[ -f /etc/debian_version ]]; then
sudo add-apt-repository ppa:aacebedo/fasd
sudo apt-get update
sudo apt-get install -y zsh fasd
fi
;;
esac
sudo chsh -s $(which zsh) $(whoami)
fi