-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_personal.sh
executable file
·100 lines (79 loc) · 2.05 KB
/
install_personal.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
#!/bin/bash
# support bash and zsh
# bash:1 zsh:2
function check_current_sh() {
cur_sh=$SHELL
if [[ $cur_sh == '/bin/bash' ]]; then
return 1
elif [[ $cur_sh == '/bin/zsh' ]]; then
return 2
else
return 0
fi
}
function bash_do() {
if test ! -e ~/.bashrc; then
touch ~/.bashrc
fi
grep '\. ~/system_config/\.bashrc' ~/.bashrc &>/dev/null
if test $? -ne 0; then
echo '. ~/system_config/.bashrc' >> ~/.bashrc
echo '. ~/system_config/private/.bashrc_personal' >> ~/.bashrc
. ~/.bashrc
fi
}
function zsh_do() {
if test ! -e ~/.zshrc; then
touch ~/.zshrc
fi
grep '\. ~/system_config/\.bashrc' ~/.zshrc &>/dev/null
if test $? -ne 0; then
echo '. ~/system_config/.bashrc' >> ~/.zshrc
. ~/.zshrc
fi
}
function install_vimrc() {
if test ! -e ~/.vimrc; then
ln -s ~/system_config/.vimrc ~/.vimrc
mkdir ~/.vim && mkdir ~/.vim.bundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
fi
}
function install_spacemacs() {
if test ! -e ~/.emacs.d; then
ln -s ~/system_config/.spacemacs ~/.spacemacs
git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
fi
}
function main() {
dir=`pwd`
bash_do
# vim
sudo apt install vim -y
install_vimrc
# emacs
sudo apt install emacs -y
install_spacemacs
# software
sudo apt install xclip -y
sudo apt install nautilus -y
sudo apt install silversearcher-ag -y
sudo apt install mongodb-clients -y
sudo apt-get install ntpdate -y
sudo ntpdate time.windows.com -y
sudo hwclock --localtime --systohc
# config spacemacs
# python lib
sudo apt install python-pip -y
sudo pip install --upgrade pip
sudo pip install flake8
sudo pip install autoflake
sudo pip install yapf
# install pylookup
builtin cd ~/.emacs.d/layers/+lang/python/local/pylookup/
chmod +x pylookup.py
sudo make download
# cd back
builtin cd $dir
}
main