-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·61 lines (51 loc) · 1.23 KB
/
setup.sh
File metadata and controls
executable file
·61 lines (51 loc) · 1.23 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# Setup script
#
# By default the script only runs updates to git modules
# in the repository for updating any vim-related stuff
#
# To perform a full install, run setup with -a option
function help {
echo "Usage: ./setup.sh [option]"
echo "This will initialise most vim plugins and bundles and then copies them over to the right places"
echo " -a Full install including ruby, gems, rake and zsh - Only works on DEBIAN-based distros!"
exit 0
}
function blah () {
echo -e '\E[33m'"$1" '\E[0m'
}
while getopts ":ah" opt; do
case $opt in
a)
all=1
;;
h)
help
;;
esac
done
sudo -v
if [ -n "$all" ];
then
blah 'Installing pre-requisites...'
sudo apt-get install ruby ruby-dev
sudo apt-get install rubygems
sudo gem install rake
sudo apt-get install rake
sudo apt-get install zsh
fi
blah 'Initialising and updating modules...'
git submodule init
git submodule update
git submodule foreach git checkout master
git submodule foreach git pull
blah 'Copying files to proper locations...'
cp .gitconfig ~/
cp .vimrc ~/
cp -R .vim ~/
if [ -n "$all" ];
then
blah 'Installing oh-my-zsh...'
./setup_zsh.sh
fi
blah 'Done!'