.dotfiles/setup.sh

44 lines
1.1 KiB
Bash
Raw Normal View History

2018-11-13 16:41:58 +01:00
#!/usr/bin/sh
commandExists()
{
command -v "$1" >/dev/null 2>&1
}
2018-11-13 16:41:58 +01:00
# remove all current dotfiles
rm -f ~/.zshrc
rm -f ~/.vimrc
rm -rf ~/.vim
2018-11-30 13:36:35 +01:00
rm -f ~/.tmux.conf
2018-11-13 16:41:58 +01:00
# create symbolic links to dotfiles
ln -s ~/.dotfiles/.vimrc ~/.vimrc
ln -s ~/.dotfiles/.zshrc ~/.zshrc
ln -s ~/.dotfiles/.vim ~/.vim
2018-11-30 13:36:35 +01:00
ln -s ~/.dotfiles/tmux.conf ~/.tmux.conf
2018-11-13 16:41:58 +01:00
# install vundle
if ! [ -f ~/.vim/bundle/Vundle.vim ]; then
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
else
echo '[INFO] Vundle is already installed.'
fi
# if atom is installed import configs
if commandExists atom; then
if commandExists apm; then
if [ -f ~/.dotfiles/atom/packages.txt ]; then
apm install --packages-file ~/.dotfiles/atom/packages.txt
else
echo '[INFO] Cannot find packages.txt skipping atom package installation.'
fi
else
echo '[INFO] Atom is installed but the apm command is not available. Cannot import atom packages!'
fi
else
echo '[INFO] Skipping atom configuration because it seems like you did not install atom yet!'
fi
2018-11-13 16:41:58 +01:00
# next steps:
# - install Vundle plugins from inside vim :PluginInstall
# - backup config files first before removing them