mirror of https://gitlab.com/rwkgyg/CFwarp.git
编辑CFwarp.sh
This commit is contained in:
parent
8632af8e5a
commit
efe11f7300
12
CFwarp.sh
12
CFwarp.sh
|
@ -20,17 +20,17 @@ readp(){ read -p "$(yellow "$1")" $2;}
|
|||
#[[ -e /etc/hosts ]] && grep -qE '^ *172.65.251.78 gitlab.com' /etc/hosts || echo -e '\n172.65.251.78 gitlab.com' >> /etc/hosts
|
||||
if [[ -f /etc/redhat-release ]]; then
|
||||
release="Centos"
|
||||
elif cat /etc/issue | grep -q -E -i "debian"; then
|
||||
elif grep -q -E -i "debian" /etc/issue; then
|
||||
release="Debian"
|
||||
elif cat /etc/issue | grep -q -E -i "ubuntu"; then
|
||||
elif grep -q -E -i "ubuntu" /etc/issue; then
|
||||
release="Ubuntu"
|
||||
elif cat /etc/issue | grep -q -E -i "centos|red hat|redhat"; then
|
||||
elif grep -q -E -i "centos|red hat|redhat" /etc/issue; then
|
||||
release="Centos"
|
||||
elif cat /proc/version | grep -q -E -i "debian"; then
|
||||
elif grep -q -E -i "debian" /proc/version; then
|
||||
release="Debian"
|
||||
elif cat /proc/version | grep -q -E -i "ubuntu"; then
|
||||
elif grep -q -E -i "ubuntu" /proc/version; then
|
||||
release="Ubuntu"
|
||||
elif cat /proc/version | grep -q -E -i "centos|red hat|redhat"; then
|
||||
elif grep -q -E -i "centos|red hat|redhat" /proc/version; then
|
||||
release="Centos"
|
||||
else
|
||||
red "不支持当前的系统,请选择使用Ubuntu,Debian,Centos系统。" && exit
|
||||
|
|
Loading…
Reference in New Issue