-
Notifications
You must be signed in to change notification settings - Fork 4
/
init.sh
executable file
·126 lines (112 loc) · 3.19 KB
/
init.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
123
124
#/bin/sh
set -e # exit on first error
# determine os
case $(uname -s) in
Linux)
OS="LINUX"
;;
Darwin)
OS="MAC"
;;
esac
install_dependencies(){
sudo apt-get update
sudo apt-get install -y \
xterm \
exuberant-ctags \
cmake \
git \
automake \
vim-nox \
i3 \
tree \
xinit \
xbacklight \
network-manager-gnome \
thunar \
gnome-icon-theme-full \
pavucontrol \
tmux \
clang-5.0 \
clang-format-5.0 \
clang-tidy-5.0
# some tex stuff, this stuff can takea lot of time
# texlive \
# texlive-fonts-extra \
# texlive-formats-extra \
# texlive-latex-extra \
# texlive-math-extra
# update the alterantives to prefer clang-5.0 over the other possible versions on the system
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-5.0 1000
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 1000
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-5.0 1000
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-5.0 1000
sudo update-alternatives --config clang++
sudo update-alternatives --config clang
sudo update-alternatives --config clang-format
sudo update-alternatives --config clang-tidy
}
git_config(){
git config --global user.name "Stanley Brown"
git config --global user.email "stan.j.brown@gmail.com"
git config --global push.default matching
}
init_dotfiles(){
# REMOVE OLD DOTFILES
echo "remove old dotfiles"
rm -rf $HOME/.vim
rm -f $HOME/.vimrc
rm -f $HOME/.bash_profile
rm -f $HOME/.tmux.conf
rm -rf $HOME/.i3
rm -f $HOME/.xinitrc
rm -f $HOME/.Xdefaults
rm -f $HOME/.muttrc
rm -rf $HOME/.mutt
rm -f $HOME/.xbindkeysrc
rm -f $HOME/.screenlayout
rm -f $HOME/.gitconfig
# SYMLINKS
echo "symlinks dotfiles"
ln -fs $PWD/vim $HOME/.vim
ln -fs $PWD/vim/vimrc $HOME/.vimrc
ln -fs $PWD/tmux/tmux.conf $HOME/.tmux.conf
ln -fs $PWD/i3 $HOME/.i3
ln -fs $PWD/configs/inputrc $HOME/.inputrc
ln -fs $PWD/configs/xinitrc $HOME/.xinitrc
ln -fs $PWD/configs/Xdefaults $HOME/.Xdefaults
ln -fs $PWD/configs/xbindkeysrc $HOME/.xbindkeysrc
ln -fs $PWD/configs/vimperatorrc $HOME/.vimperatorrc
ln -fs $PWD/configs/bash_profile $HOME/.bash_profile
echo "source ~/.bash_profile" >> $HOME/.bashrc
ln -fs $PWD/configs/gitconfig $HOME/.gitconfig
ln -fs $PWD/screenlayout $HOME/.screenlayout
return 0
}
init_vim() {
echo "install vim plugins"
git submodule init
git submodule update
vim -c VundleInstall -c quitall
exec ./vim/bundle/fzf/install --all
return 0;
}
# init() {
# install_dependencies
# git_config
# #
# init_dotfiles
# init_vim
# echo "Done! :)"
# }
install_libs() {
bash scripts/install/install_ceres.bash
bash scripts/install/install_gtsam.bash
bash scripts/install/install_opencv3.bash
}
# MAIN
install_dependencies
# init
# install_libs
# init_dotfiles
# init_vim