-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathksl_install.sh
102 lines (77 loc) · 2.69 KB
/
ksl_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
# positonal args :
gitname=$1
gitemail=$2
echo "Starting installs"
echo "parameters:"
echo "gitname: $gitname"
echo "gitemail: $gitemail"
# update and upgrade
sudo apt update
sudo apt upgrade
sudo apt install openssh-server
# Install #
# miniconda check version here: https://docs.conda.io/en/latest/miniconda.html#linux-installers
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
sleep 10
source ~/.bashrc
conda config --prepend channels conda-forge
# pycharm
sudo snap install pycharm-community --classic
sudo snap install pycharm-professional --classic
# draw.io
sudo snap install drawio
# zoom
sudo snap install zoom-client
# install modflow
cd "$(dirname "$0")"
bash support_files/install_modflow.sh
# install and compile pest
bash support_files/compile_pest/compile_pest.sh
# set tmux config
echo "set -g mouse on" >> ~/.tmux.conf
echo "set -g history-limit 5000" >> ~/.tmux.conf
# set up git
git config --global user.name $gitname
git config --global user.email $gitemail
# manage .bashrc as git
cd ~
git init
git add ~/.bashrc
git commit -m "Added .bashrc to version control"
# tmux logging
git clone https://github.com/tmux-plugins/tmux-logging ~/.tmux/tmux-logging
echo "run-shell ~/.tmux/tmux-logging/logging.tmux" >> ~/.tmux.conf
# hack to auto log
# ensure wd is correct
cd "$(dirname "$0")"
echo "changing cd to $(dirname "$0")"
cp support_files/variables.sh ~/.tmux/tmux-logging/scripts/variables.sh
# change: filename_suffix="#{session_name}-#{window_index}-#{pane_index}-%Y%m%dT%H%M%S.log" --> filename_suffix="#{session_name}-#{window_index}-#{pane_index}.log"
cp support_files/.ensure_tmux_logging_on.sh ~/.tmux/tmux-logging/scripts/.ensure_tmux_logging_on.sh
# change: from ~/.tmux/tmux-logging/scripts/toggle_logging.sh
#
# toggle_pipe_pane() {
# if is_logging; then
# echo 'tmux already logging'
# # set_logging_variable "not logging"
# # stop_pipe_pane
# else
# set_logging_variable "logging"
# start_pipe_pane
# fi
# }
chmod +x ~/.tmux/tmux-logging/scripts/.ensure_tmux_logging_on.sh
echo "~/.tmux/tmux-logging/scripts/.ensure_tmux_logging_on.sh" >> ~/.bashrc
source ~/.bashrc
# handle the matplotlib problem: https://komanawa.atlassian.net/wiki/spaces/PT/pages/1047232531/Python#Python-on-linux-challenges%3A
mkdir ~/.config/matplotlib
echo "backend: TkAgg" >> ~/.config/matplotlib/matplotlibrc
# commit .bashrc as git
cd ~
git commit -m "finished normal installs"
# install Zotero
wget -qO- https://raw.githubusercontent.com/retorquere/zotero-deb/master/install.sh | sudo bash
sudo apt update
sudo apt install zotero
echo "Finished installs"