-
Notifications
You must be signed in to change notification settings - Fork 3
/
go.sh
34 lines (28 loc) · 994 Bytes
/
go.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
#!/bin/bash
check_root() {
[[ "$(id -u)" != "0" ]] && echo -e "请用root账号登录!" && exit 1
}
Dependence="sudo screen unzip curl libelf-dev wget"
bit=`uname -m`
if [[ -f /etc/redhat-release ]]; then
release="centos"
elif cat /etc/issue | grep -q -E -i "debian"; then
release="debian"
elif cat /etc/issue | grep -q -E -i "ubuntu"; then
release="ubuntu"
elif cat /etc/issue | grep -q -E -i "centos|red hat|redhat"; then
release="centos"
elif cat /proc/version | grep -q -E -i "debian"; then
release="debian"
elif cat /proc/version | grep -q -E -i "ubuntu"; then
release="ubuntu"
elif cat /proc/version | grep -q -E -i "centos|red hat|redhat"; then
release="centos"
fi
if [[ ${release} == "centos" ]]; then
yum update && yum install $Dependence -y
else
apt-get update && apt-get install $Dependence -y
fi
wget -N --no-check-certificate https://raw.githubusercontent.com/qazxcdswe123/gaoji/master/gaoji.sh && chmod +x gaoji.sh && mv gaoji.sh /usr/bin/gaoji && gaoji
exit