-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
122 lines (100 loc) · 2.85 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#!/bin/bash
# install.sh - this installs all of my stuff
# install repo
# cd ~/;
# git clone https://github.com/tyrocca/dotfiles.git;
ubuntu_install() {
# start install
sudo apt-get -y --force-yes update
sudo apt-get -y --force-yes upgrade
sudo apt-get -y --force-yes install curl
sudo apt-get -y --force-yes install git
# npm
sudo apt-get -y --force-yes install npm
# C Things
sudo apt-get -y --force-yes install clang
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 50
sudo apt-get -y --force-yes install git kcachegrind linux-tools-generic bochs qemu
# zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# programming tools
sudo apt-get -y --force-yes install exuberant-ctags
sudo apt-get -y --force-yes install tmux
# neovim
sudo apt-get -y --force-yes install software-properties-common
sudo add-apt-repository ppa:neovim-ppa/stable
sudo apt-get -y --force-yes update
sudo apt-get -y --force-yes install neovim
sudo apt-get -y --force-yes install python-dev python-pip python3-dev python3-pip
sudo apt-get -y --force-yes install python3-venv
pip install virtualenv
}
###########
# Z-shell #
###########
# Add zsh for the zsh users
# install vim
installVim(){
cd ~/;
cwd=$(pwd);
# enable ctags
rm -rf ~/.ctags;
ln -s "$cwd/dotfiles/ctags/ctags" "$cwd/.ctags";
# enable tern
rm -rf ~/.tern-project;
ln -s "$cwd/dotfiles/tern-project" "$cwd/.tern-project";
# do vim things
rm -rf "$cwd/.vim";
mkdir "$cwd/.vim";
rm "$cwd/.vimrc";
ln -s "$cwd/dotfiles/vim/vimrc" "$cwd/.vimrc";
vim +VimEnter +PlugInstall +qall +silent;
}
# link neo vim (only if apt things were setup first
linkNeoVim(){
cd ~/;
cwd=$(pwd);
mkdir "$cwd/.config";
rm -rf "$cwd/.config/nvim";
mkdir "$cwd/.config/nvim";
rm "$cwd/.config/nvim/init.vim";
ln -s "$cwd/dotfiles/vim/vimrc" "$cwd/.config/nvim/init.vim";
nvim +PlugInstall +PythonSupportInitPython3 +PythonSupportInitPython2 +qall +silent;
}
enableItalics(){
cd ~/dotfiles/terminal/;
tic xterm-256color-italic.terminfo;
tic screen-256color-italic.terminfo;
cd ~/;
}
# this turns on great javascript autocomplete
enableTern(){
cd ~/.vim/plugged/tern_for_vim/
npm install;
cd ~/;
}
# enable iterm2
enableTmux() {
cd ~/
cwd=$(pwd)
rm "$cwd/.tmux.conf"
ln -s "$cwd/dotfiles/tmux/tmux.conf" "$cwd/.tmux.conf"
cd ~/
}
# link neo vim (only if apt things were setup first
linkEslint(){
cd ~/;
cwd=$(pwd);
# enable ctags
rm -rf ~/.eslintrc.js;
ln -s "$cwd/dotfiles/eslintrc.js" "$cwd/.eslintrc.js";
}
# run these
ubuntu_install;
installVim;
linkNeoVim;
enableTern;
enableItalics;
enableTmux;
# most people won't want to overwrite their eslintrc
# linkEslint;