dotfiles/fish/setup.sh
2017-10-14 22:52:13 +02:00

27 lines
572 B
Bash
Executable File

#!/usr/bin/env bash
function main()
{
# Install fish shell
if ! brew list | grep fish >/dev/null; then
brew install fish
fi
# Add to list of shells and set as default
if ! grep /usr/local/bin/fish < /etc/shells >/dev/null; then
echo /usr/local/bin/fish | sudo tee -a /etc/shells
chsh -s /usr/local/bin/fish
fi
# Install configuration files
if [ ! -d ${HOME}/.config ]; then
mkdir ${HOME}/.config
fi
if [ ! -e ${HOME}/.config/fish ]; then
rm -rf ${HOME}/.config/fish
ln -s ${DOTFILES}/fish ${HOME}/.config/.
fi
}
main "$@"