forked from starlone/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·111 lines (100 loc) · 1.92 KB
/
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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/bin/sh
BASEDIR=$(dirname "$0")
cd $BASEDIR
git pull
taskshell() {
echo '
----------
- Shell
----------
'
sudo apt update
sudo apt -y full-upgrade
dependencies=`cat dependencies.txt`
sudo apt install -y $dependencies
}
taskpython(){
echo '
----------
- Python
----------
'
dep_python=`cat dependencies-python.txt`
sudo pip install $dep_python
}
tasknodejs(){
echo '
----------
- NodeJS
----------
'
sudo npm install -g n
# Install last nodejs
sudo -E n stable
sudo npm install -g npm
dep_nodejs=`cat dependencies-nodejs.txt`
sudo npm install -g $dep_nodejs
}
taskterminator(){
echo '
----------
- Terminator
----------
'
if [ ! -d ~/.config/terminator ]; then
mkdir -p ~/.config/terminator
fi
ln -sf ~/git/star.ubuntu-setup/terminator_config ~/.config/terminator/config
}
taskvim(){
echo '
----------
- VIM
----------
'
mkdir -p ~/git
cd ~/git
if [ ! -d ~/git/starlone.vim ]; then
git clone https://github.com/starlone/starlone.vim.git
cd ~/
rm -rf .vimrc
ln -s ~/git/starlone.vim/vimrc .vimrc
vim +PlugInstall +qall
fi
cd ~/git/starlone.vim
git pull
vim +PlugUpgrade +qall
vim +PlugUpdate +qall
cd ~/.vim/plugged/YouCompleteMe
./install.py --tern-completer --js-completer --java-completer
}
if [ $# -eq 0 ]; then
taskshell
taskterminator
taskpython
tasknodejs
taskvim
fi
for PARAM in $*
do
case $PARAM in
'shell')
taskshell
;;
'python')
taskpython
;;
'nodejs')
tasknodejs
;;
'terminator')
taskterminator
;;
'vim')
taskvim
;;
*)
echo "Não existe esta opção! " $PARAM "\n"
;;
esac
done