Grouping stuff

This commit is contained in:
2017-10-15 20:50:00 +02:00
parent b90cf92fb5
commit 832fa5ee30
30 changed files with 120 additions and 37 deletions

32
terminal/fish/setup.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/env bash
source ${DOTFILES}/helpers.sh
function main()
{
local scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
print_info "Installing fish shell"
# Install fish shell
brewget fish
# 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
makedir ${HOME}/.config
if ! head -n 1 ${scriptdir}/config.fish | grep ${DOTFILES} >/dev/null; then
sed -i '' "1s;.*;set -x DOTFILES ${DOTFILES};" ${scriptdir}/config.fish
fi
linkfile ${scriptdir} ${HOME}/.config/fish
print_ok "Fish shell installed"
}
main "$@"