/
setup_fbi_server_env.sh
executable file
·61 lines (50 loc) · 2.21 KB
/
setup_fbi_server_env.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
#!/bin/bash
# mainly for centos7
sudo yum -y install http://mirror.ghettoforge.org/distributions/gf/el/7/plus/x86_64/tmux-2.4-2.gf.el7.x86_64.rpm
curl -L https://copr.fedorainfracloud.org/coprs/mcepl/vim8/repo/epel-7/mcepl-vim8-epel-7.repo -o /etc/yum.repos.d/mcepl-vim8-epel-7.repo
sudo yum update vim*
if [ $(getent passwd $(whoami) | cut -d: -f7) = "/bin/bash" ]; then
echo "Changing shell to zsh.. please enter password for ${currentuser}."
chsh -s $(which zsh)
fi
# zsh
if [ -d ~/.oh-my-zsh ]; then
cd ~/.oh-my-zsh
git pull
else
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
fi
if [ -d ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting ]; then
cd ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
git pull
else
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
fi
if [ -d ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions ]; then
cd ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
git pull
else
git clone git://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
fi
# vim
cd ~/gitrepos
if [ ! -d vim-wombat256mod ]; then
git clone https://github.com/michalbachowski/vim-wombat256mod.git
sudo cp ~/gitrepos/vim-wombat256mod/colors/wombat256mod.vim /usr/share/vim/vim74/colors
sudo cp ~/gitrepos/vim-wombat256mod/colors/wombat256mod.vim /usr/share/vim/vim80/colors
fi
# tmux
if [ ! -d ~/.tmux/plugins/tpm ]; then
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
fi
# get custom files from git
curl -H 'Cache-Control: no-cache' -s https://raw.githubusercontent.com/madchap/misc/master/.vimrc > ~/.vimrc
curl -H 'Cache-Control: no-cache' -s https://raw.githubusercontent.com/madchap/misc/master/.zshrc-server > ~/.zshrc
curl -H 'Cache-Control: no-cache' -s https://raw.githubusercontent.com/madchap/misc/master/zsh_autosuggestions_config.zsh > ~/.oh-my-zsh/custom/config.zsh
curl -H 'Cache-Control: no-cache' -s https://raw.githubusercontent.com/madchap/misc/master/.tmux-server.conf > ~/.tmux.conf
curl -H 'Cache-Control: no-cache' -s https://raw.githubusercontent.com/madchap/misc/master/.sshrc > ~/.ssh/myrc
# Install vundle plugins
vim +PluginInstall +qall
echo
echo
echo "Done."