-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_config.sh
executable file
·84 lines (65 loc) · 2.14 KB
/
install_config.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
#! /bin/sh
startingDir=${PWD}
sudo apt update
## Config vim
sudo apt install -y vim-gtk
#delete old configuration files
rm ${HOME}/.vimrc
rm -rf ${HOME}/.vim
#create symlinks to the configuration files
cp ${PWD}/vim/.vimrc ${HOME}/.vimrc
cp -r ${PWD}/vim/.vim ${HOME}/.vim
#install the software that manages the plugins for vim
mkdir ${HOME}/.vim/bundle
git clone https://github.com/gmarik/Vundle.vim.git ${HOME}/.vim/bundle/Vundle.vim
#install language spelling
# mkdir ${HOME}/spell
# for lang in fr en
# do
# for ext in spl sug
# do
# wget -P ${HOME}/.vim/spell http://ftp.vim.org/vim/runtime/spell/${lang}.utf-8.${ext}
# wget -P ${HOME}/.vim/spell http://ftp.vim.org/vim/runtime/spell/${lang}.latin1.${ext}
# done
# done
#install language assistance
# mkdir ${HOME}/.vim/progExt
# wget https://www.languagetool.org/download/LanguageTool-2.6.zip
# unzip -o : overwrites the unzipped files if it already exists
# unzip -o LanguageTool-2.6.zip
# mv LanguageTool-2.6 ${HOME}/.vim/progExt/
# rm -rf LanguageTool-2.6*
vim +PluginInstall +qall
sudo cp -r ${HOME}/.vim /root/.vim
sudo cp ${HOME}/.vimrc /root/.vimrc
cd ${startingDir}
## Config zsh
#delete old configuration files
rm ${HOME}/.zshrc
#create symlinks to the configuration files
ln -s ${PWD}/zsh/.zshrc ${HOME}/.zshrc
sudo git clone https://github.com/olivierverdier/zsh-git-prompt.git /opt/zsh-git-prompt
sudo apt install -y zsh
sudo cp ${PWD}/zsh/config_admin/zshrc /etc/zsh/
sudo cp ${PWD}/zsh/config_admin/zshenv /etc/zsh/
sudo cp ${PWD}/zsh/config_admin/zlogin /etc/zsh/
sudo cp ${PWD}/zsh/config_admin/zlogout /etc/zsh/
sudo cp ${PWD}/zsh/config_admin/dir_colors /etc/
sudo cp ${HOME}/.zshrc /root/.zshrc
chsh -s /bin/zsh ${USER}
chsh -s /bin/zsh root
cd ${startingDir}
## Config screen
sudo apt install -y screen
rm ${HOME}/.screenrc
cp ${PWD}/screen/.screenrc ${HOME}/.screenrc
sudo cp ${HOME}/.screenrc /root/.screenrc
cd ${startingDir}
#sudo cp script/rmate.sh /usr/local/bin/rsub
#sudo chmod +x /usr/local/bin/rsub
## Install fail2ban
cd ${startingDir}
sudo apt install fail2ban
sudo cp ${PWD}/fail2ban/jail.local /etc/fail2ban/jail.local
sudo service fail2ban restart
#cd ${startingDir}