26 lines
722 B
Bash
Executable file
26 lines
722 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
|
|
;;
|
|
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
|
|
|
|
chsh -s $(which zsh)
|
|
fi
|