#!/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