dotfiles/setup.sh
2019-02-14 19:45:24 +01:00

21 lines
632 B
Bash
Executable file

#!/bin/bash
LINK_FILES=(vimrc tmux.conf gitconfig dircolors)
mkdir ~/.home-git-back 2>/dev/null
for file in ${LINK_FILES[@]}; do
if [ ! -L ~/.${file} ] ; then
mv -v ~/.${file} ~/.home-git-back
ln -s $(pwd)/${file} ~/.${file}
fi
done
[ ! -d ~/.bash-git-prompt ] && git clone https://github.com/nold360/bash-git-prompt.git ~/.bash-git-prompt
mkdir -p ~/.vim/bundle 2>/dev/null
[ ! -d ~/.vim/bundle/Vundle.vim ] && git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim -c ":PluginInstall" -c ":q" -c ":q"
grep -q "source $(pwd)/bashrc" ~/.bashrc || echo "source $(pwd)/bashrc" >> ~/.bashrc