-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
90 lines (80 loc) · 2.97 KB
/
install.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
#!/bin/bash
# ================================================================================
# File Name: install.sh
# Author: DaiDai
# Mail: daidai4269@aliyun.com
# Created Time: Sat May 25 14:54:22 2019
# ================================================================================
# backup old config file
mkdir ~/.old_dotfiles/
sudo mv .vimrc ~/.old_dotfiles/
sudo mv .bashrc ~/.old_dotfiles/
sudo mv .tmux.conf ~/.old_dotfiles/
sudo mv .bash_profile ~/.old_dotfiles/
sudo mv .zshrc ~/.old_dotfiles/
# install
if [[ `uname -a` =~ "Darwin" ]];
then
echo "Mac OX"
echo "TODO: have not coding this install script!"
elif [[ `uname -a` =~ "ubuntu" ]];
then
echo "Ubuntu"
sudo apt-get update
# tool
sudo apt-get install tree ssh rar unrar zip unzip openssh-server autojump zsh
sudo apt-get install extundelete # avoid error rm -rf
sudo apt-get install htop # sys moniter
sudo apt-get install git-extras # git command extension tool
sudo apt-get install sshfs # mount remote directions
sudo apt-get install supervisor # process manager tool
sudo apt-get install sysstat
sudo apt-get install pstack
# CC
sudo apt-get install g++ gcc clange
sudo apt-get install ctags cmake gdb
sudo apt-get install manpages manpages-dev \
manpages-de manpages-de-dev \
manpages-posix manpages-posix-dev \
manpages-zh glibc-doc # manual
sudo apt-get install libboost-dev # boost
# Py
wget https://repo.anaconda.com/archive/Anaconda3-2019.07-Linux-x86_64.sh;bash Anaconda3-2019.07-Linux-x86_64.sh # anaconda3
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ # change source
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ # change source
conda config --set show_channel_urls yes # change source
pip install -r requirements.txt
mv ~/dotfiles/.pip/.pip.conf ~/.pip/.pip.conf
# nodejs
sudo apt-get install nodejs
sudo apt-get isntall npm
# zsh
sudo sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
zsh
# tmux
sudo apt-get install tmux
rm -rf ~/.tmux.conf
mv ~/dotfiles/.tmux.conf ~/.tmux.conf
# tmux plugin manager
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# TODO: install plugin (Prefix + I)
# vim
sudo apt-get install vim
rm -rf ~/.vim
rm ~/.vimrc
mv ~/dotfiles/.vimrc ~/.vimrc
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim # Vundle
# TODO: docker
sudo apt-get install colordiff
# multi GCC G++ CLANG version
sudo apt install build-essential
elif [[ `uname -a` =~ "centos" ]];
then
echo "Centos"
echo "TODO: have not coding this install script!"
else
echo "ERROR: not find this OS version"
fi
# delete dotfiles
sudo rm -rf ~/dotfiles
echo "DaiDai' dotfiles install Completed!"