@ -21,10 +21,10 @@ E[6]="This script only supports Debian, Ubuntu, CentOS, Arch or Alpine systems,
C[ 6] = "本脚本只支持 Debian、Ubuntu、CentOS、Arch 或 Alpine 系统,问题反馈:[https://github.com/fscarmen/warp/issues]"
C[ 6] = "本脚本只支持 Debian、Ubuntu、CentOS、Arch 或 Alpine 系统,问题反馈:[https://github.com/fscarmen/warp/issues]"
E[ 7] = "Curren operating system is \$SYS.\\\n The system lower than \$SYSTEM \${MAJOR[int]} is not supported. Feedback: [https://github.com/fscarmen/warp/issues]"
E[ 7] = "Curren operating system is \$SYS.\\\n The system lower than \$SYSTEM \${MAJOR[int]} is not supported. Feedback: [https://github.com/fscarmen/warp/issues]"
C[ 7] = "当前操作是 \$SYS\\\n 不支持 \$SYSTEM \${MAJOR[int]} 以下系统,问题反馈:[https://github.com/fscarmen/warp/issues]"
C[ 7] = "当前操作是 \$SYS\\\n 不支持 \$SYSTEM \${MAJOR[int]} 以下系统,问题反馈:[https://github.com/fscarmen/warp/issues]"
E[ 8] = "Installing curl... "
E[ 8] = "Install dependence-list: "
C[ 8] = "安装curl中…… "
C[ 8] = "安装依赖列表: "
E[ 9] = "It is necessary to upgrade the latest package library before install curl.It will take a little time,please be patiently.. ."
E[ 9] = "All dependencies already exist and do not need to be installed additionally ."
C[ 9] = "先升级软件库才能继续安装 curl,时间较长,请耐心等待…… "
C[ 9] = "所有依赖已存在,不需要额外安装 "
E[ 10] = "Installation of curl fails. Script aborts. Feedback:[https://github.com/fscarmen/warp/issues]"
E[ 10] = "Installation of curl fails. Script aborts. Feedback:[https://github.com/fscarmen/warp/issues]"
C[ 10] = "安装 curl 失败,脚本中止,问题反馈:[https://github.com/fscarmen/warp/issues]"
C[ 10] = "安装 curl 失败,脚本中止,问题反馈:[https://github.com/fscarmen/warp/issues]"
E[ 11] = "Warp-go is not installed yet."
E[ 11] = "Warp-go is not installed yet."
@ -293,11 +293,21 @@ check_operating_system() {
# 安装 curl
# 安装 curl
check_dependencies( ) {
check_dependencies( ) {
type -p curl >/dev/null 2>& 1 || ( hint " $( text 8) " && ${ PACKAGE_INSTALL [int] } curl 2>/dev/null) || ( hint " $( text 9) " && ${ PACKAGE_UPDATE [int] } && ${ PACKAGE_INSTALL [int] } curl 2>/dev/null)
! type -p curl >/dev/null 2>& 1 && error " $( text 10) "
# 对于 alpine 系统,升级库并重新安装依赖
# 对于 alpine 系统,升级库并重新安装依赖
[ [ $SYSTEM = Alpine && ! -e /opt/warp-go/warp-go ] ] && ( ${ PACKAGE_UPDATE [int] } ; ${ PACKAGE_INSTALL [int] } curl wget grep)
if [ $SYSTEM = Alpine ] ; then
[ ! -e /opt/warp-go/warp-go ] && ( ${ PACKAGE_UPDATE [int] } ; ${ PACKAGE_INSTALL [int] } curl wget grep bash )
else
DEPS_CHECK = ( "ping" "wget" "curl" "systemctl" "ip" )
DEPS_INSTALL = ( " inetutils-ping" " wget" " curl" " systemctl" " iproute2" )
for c in " ${ DEPS_CHECK [@] } " ; do ! type -p $c >/dev/null 2>& 1 && DEPS += $c ; done
if [ -n " $DEPS " ] ; then
info " \n $( text 8) $DEPS \n "
${ PACKAGE_UPDATE [int] }
${ PACKAGE_INSTALL [int] } $DEPS
else
info " \n $( text 9) \n "
fi
fi
}
}
# 检测 IPv4 IPv6 信息,WARP Ineterface 开启,普通还是 Plus账户 和 IP 信息
# 检测 IPv4 IPv6 信息,WARP Ineterface 开启,普通还是 Plus账户 和 IP 信息