-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·46 lines (38 loc) · 968 Bytes
/
install.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
44
45
46
#!/usr/bin/env bash
while getopts ":i" opt; do
case $opt in
i)
useinternet=true
;;
\?)
echo "Invalid option: -$OPTARG. Use -i to download things from the Internet." >&2
exit 1
;;
esac
done
mkdir -p ~/.vim
mkdir -p ~/.vim/autoload
mkdir -p -m 700 ~/.vim/backup
mkdir -p ~/.vim/bundle
mkdir -p ~/.vim/colors
mkdir -p ~/.vim/indent
mkdir -p -m 700 ~/.vim/swap
mkdir -p -m 700 ~/.vim/undo
cp .vim/vimrc ~/.vim/vimrc
cp .vim/gvimrc ~/.vim/gvimrc
cp .vim/indent/*.vim ~/.vim/indent/
if [ -w ~/.vimrc ]; then
mv ~/.vimrc ~/.vim/vimrc-old
fi
if [ -w ~/.gvimrc ]; then
mv ~/.vimrc ~/.vim/vimrc-old
fi
echo "Copied files to ~/.vim"
if [ $useinternet ]; then
echo "Downloading vim plugins from the Internet..."
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
pushd ~/.vim/bundle
git clone git://github.com/tpope/vim-dispatch.git
git clone git://github.com/jpo/vim-railscasts-theme.git
popd
fi