Finished cleanup

This commit is contained in:
2017-10-14 22:52:13 +02:00
parent ee2a05a99a
commit 99c7cc50a8
6 changed files with 35 additions and 25 deletions

View File

@@ -1,21 +1,26 @@
#!/usr/bin/env bash
function setup_fish()
function main()
{
brew install fish
# 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
}
function link_config()
{
mkdir ${HOME}/.config
ln -s ${DOTFILES}/fish ${HOME}/.config/.
}
export DOTFILES=/Users/thomas/dotfiles
setup_fish
link_config
main "$@"