forked from diraol/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap.sh
executable file
·79 lines (60 loc) · 1.77 KB
/
bootstrap.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env bash
echo "1 - Instalando pacotes básicos iniciais"
sudo aptitude install -y ruby rdoc irb git vim
echo "2 - Baixando RubyGems no diretório ~/tools/"
mkdir -p ~/tools
cd ~/tools
wget http://production.cf.rubygems.org/rubygems/rubygems-2.3.0.tgz
echo "3 - Extraindo o pacote RubyGems"
tar xzf rubygems-2.3.0.tgz
echo "4 - Instalando o RubyGems"
cd rubygems-2.3.0
sudo ruby setup.rb all
echo "5 - Removendo pasta tools não mais necessária"
rm -rf ~/tools
echo "6 - Instalando o homesick"
sudo gem install homesick
echo "7 - Clonando o repositório do estadão dados para dotfiles"
homesick clone https://github.com/estadaodados/dotfiles.git
echo "8 - Instalando ctags"
sudo apt-get install exuberant-ctags -y
git submodule update --init
homesick symlink dotfiles
git_uri='https://github.com/estadaoDados/spf13-vim.git'
git_branch='3.0'
VUNDLE_URI="https://github.com/gmarik/vundle.git"
lnif() {
if [ -e "$1" ]; then
ln -sf "$1" "$2"
fi
ret="$?"
}
clone_vundle() {
if [ ! -e "$HOME/.vim/bundle/vundle" ]; then
git clone $VUNDLE_URI "$HOME/.vim/bundle/vundle"
else
cd "$HOME/.vim/bundle/vundle" &&
git pull origin master
fi
ret="$?"
}
create_symlinks() {
endpath="$HOME/.spf13-vim"
if [ ! -d "$endpath/.vim/bundle" ]; then
mkdir -p "$endpath/.vim/bundle"
fi
lnif "$endpath/.vimrc" "$HOME/.vimrc"
lnif "$endpath/.vimrc.bundles" "$HOME/.vimrc.bundles"
lnif "$endpath/.vimrc.before" "$HOME/.vimrc.before"
lnif "$endpath/.vim" "$HOME/.vim"
ret="$?"
}
setup_vundle() {
system_shell="$SHELL"
export SHELL='/bin/sh'
vim +BundleInstall +BundleClean +qall
export SHELL="$system_shell"
}
create_symlinks "Setting up vim symlinks"
clone_vundle "Successfully cloned vundle"
setup_vundle "Now updating/installing plugins using Vundle"