-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_dotfiles.sh
executable file
·40 lines (32 loc) · 1.09 KB
/
setup_dotfiles.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
#!/bin/bash
VUNDLE_GITHUB_URL="https://github.com/VundleVim/Vundle.vim.git"
VIM_VUNDLE_PLUGINS_DIR=".vim/bundle"
# get the dir of the current script
script_directory=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
if [[ ! -a ~/.vimrc ]]
then
ln -f -s $script_directory/vim/vimrc.vim ~/.vimrc
fi
if [[ ! -a ~/.gitignore_global ]]
then
ln -f -s $script_directory/misc/gitignore_global ~/.gitignore_global
fi
# -p says to create the dir if it doesn't exist already
mkdir -p $HOME/bin
if [[ ! -a ~/bin/gen_cscope_tags.sh ]]
then
ln -f -s $script_directory/misc/gen_cscope_tags.sh ~/bin/gen_cscope_tags.sh
fi
# Clone Vundle under .vim/bundle if it does not exist
if [[ ! -d ~/${VIM_VUNDLE_PLUGINS_DIR}/Vundle.vim ]]
then
echo -e "Setting-up Vundle: Vim's plugin manager"
mkdir -p ~/${VIM_VUNDLE_PLUGINS_DIR}
pushd ~/${VIM_VUNDLE_PLUGINS_DIR} > /dev/null
git clone ${VUNDLE_GITHUB_URL}
popd > /dev/null
echo "Run :PluginInstall in Vim to install your Plugins"
fi
source $script_directory/bash/setup_bash.sh
source $script_directory/gitconfig_setup.sh
source $script_directory/tmux/tmux_setup.sh