forked from tomnomnom/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·43 lines (36 loc) · 918 Bytes
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
dotfilesDir=$(pwd)
function linkDotfile {
dest="${HOME}/${1}"
dateStr=$(date +%Y-%m-%d-%H%M)
if [ -h ~/${1} ]; then
# Existing symlink
echo "Removing existing symlink: ${dest}"
rm ${dest}
elif [ -f "${dest}" ]; then
# Existing file
echo "Backing up existing file: ${dest}"
mv ${dest}{,.${dateStr}}
elif [ -d "${dest}" ]; then
# Existing dir
echo "Backing up existing dir: ${dest}"
mv ${dest}{,.${dateStr}}
fi
echo "Creating new symlink: ${dest}"
ln -s ${dotfilesDir}/${1} ${dest}
}
linkDotfile .vim
linkDotfile .vimrc
linkDotfile .ackrc
linkDotfile .bashrc
linkDotfile .gitconfig
linkDotfile .tmux.conf
linkDotfile .goomwwmrc
linkDotfile .inputrc
linkDotfile .xinitrc
linkDotfile .curlrc
linkDotfile .gf
mkdir -p $dotfilesDir/.vim/bundle
cd $dotfilesDir/.vim/bundle
git clone https://github.com/VundleVim/Vundle.vim.git
vim +PluginInstall +qall