-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·51 lines (39 loc) · 870 Bytes
/
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
#!/bin/bash
# support bash and zsh
# bash:1 zsh:2
function check_current_sh() {
cur_sh=$SHELL
if [[ $cur_sh == '/bin/bash' ]]; then
return 1
elif [[ $cur_sh == '/bin/zsh' ]]; then
return 2
else
return 0
fi
}
function bash_do() {
if test ! -e ~/.bashrc; then
touch ~/.bashrc
fi
grep '\. ~/system_config/\.bashrc' ~/.bashrc &>/dev/null
if test $? -ne 0; then
echo '. ~/system_config/.bashrc' >> ~/.bashrc
. ~/.bashrc
fi
}
function zsh_do() {
if test ! -e ~/.zshrc; then
touch ~/.zshrc
fi
grep '\. ~/system_config/\.bashrc' ~/.zshrc &>/dev/null
if test $? -ne 0; then
echo '. ~/system_config/.bashrc' >> ~/.zshrc
. ~/.zshrc
fi
}
function main() {
bash_do
sudo apt install xclip -y
sudo apt install nautilus -y
}
main