mirror of https://gitlab.com/rwkgyg/CFwarp.git
编辑CFwarp.sh
This commit is contained in:
parent
efe11f7300
commit
80427bdb8e
13
CFwarp.sh
13
CFwarp.sh
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
|
@ -20,17 +21,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
|
#[[ -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
|
if [[ -f /etc/redhat-release ]]; then
|
||||||
release="Centos"
|
release="Centos"
|
||||||
elif grep -q -E -i "debian" /etc/issue; then
|
elif cat /etc/issue | grep -q -E -i "debian"; then
|
||||||
release="Debian"
|
release="Debian"
|
||||||
elif grep -q -E -i "ubuntu" /etc/issue; then
|
elif cat /etc/issue | grep -q -E -i "ubuntu"; then
|
||||||
release="Ubuntu"
|
release="Ubuntu"
|
||||||
elif grep -q -E -i "centos|red hat|redhat" /etc/issue; then
|
elif cat /etc/issue | grep -q -E -i "centos|red hat|redhat"; then
|
||||||
release="Centos"
|
release="Centos"
|
||||||
elif grep -q -E -i "debian" /proc/version; then
|
elif cat /proc/version | grep -q -E -i "debian"; then
|
||||||
release="Debian"
|
release="Debian"
|
||||||
elif grep -q -E -i "ubuntu" /proc/version; then
|
elif cat /proc/version | grep -q -E -i "ubuntu"; then
|
||||||
release="Ubuntu"
|
release="Ubuntu"
|
||||||
elif grep -q -E -i "centos|red hat|redhat" /proc/version; then
|
elif cat /proc/version | grep -q -E -i "centos|red hat|redhat"; then
|
||||||
release="Centos"
|
release="Centos"
|
||||||
else
|
else
|
||||||
red "不支持当前的系统,请选择使用Ubuntu,Debian,Centos系统。" && exit
|
red "不支持当前的系统,请选择使用Ubuntu,Debian,Centos系统。" && exit
|
||||||
|
|
Loading…
Reference in New Issue