Browse Source

beta39: Update the official WARP client support list

P3TERX 3 years ago
parent
commit
97a5bed87f
1 changed files with 13 additions and 18 deletions
  1. 13 18
      warp.sh

+ 13 - 18
warp.sh

@@ -3,7 +3,7 @@
 # https://github.com/P3TERX/warp.sh
 # Description: Cloudflare WARP Installer
 # System Required: Debian, Ubuntu, Fedora, CentOS, Oracle Linux, Arch Linux
-# Version: beta38
+# Version: beta39
 #
 # MIT License
 #
@@ -28,7 +28,7 @@
 # SOFTWARE.
 #
 
-shVersion='beta38'
+shVersion='beta39'
 
 FontColor_Red="\033[31m"
 FontColor_Red_Bold="\033[1;31m"
@@ -152,28 +152,25 @@ Install_Requirements_Debian() {
 
 Install_WARP_Client_Debian() {
     if [[ ${SysInfo_OS_Name_lowercase} = ubuntu ]]; then
-        OS_CodeName='focal'
-    elif [[ ${SysInfo_OS_Name_lowercase} = debian ]]; then
-        case ${SysInfo_OS_Ver_major} in
-        11)
-            OS_CodeName='bullseye'
-            ;;
-        10)
-            OS_CodeName='buster'
+        case ${SysInfo_OS_CodeName} in
+        bionic | focal | jammy) ;;
+        *)
+            log ERROR "This operating system is not supported."
+            exit 1
             ;;
+        esac
+    elif [[ ${SysInfo_OS_Name_lowercase} = debian ]]; then
+        case ${SysInfo_OS_CodeName} in
+        buster | bullseye) ;;
         *)
             log ERROR "This operating system is not supported."
             exit 1
             ;;
         esac
-    elif [[ ${SysInfo_RelatedOS} = *debian* ]]; then
-        OS_CodeName='buster'
-    else
-        OS_CodeName="${SysInfo_OS_CodeName}"
     fi
     Install_Requirements_Debian
     curl https://pkg.cloudflareclient.com/pubkey.gpg | gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg
-    echo "deb [arch=amd64 signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ ${OS_CodeName} main" | tee /etc/apt/sources.list.d/cloudflare-client.list
+    echo "deb [arch=amd64 signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ ${SysInfo_OS_CodeName} main" | tee /etc/apt/sources.list.d/cloudflare-client.list
     apt update
     apt install cloudflare-warp -y
 }
@@ -208,9 +205,7 @@ Install_WARP_Client() {
         Install_WARP_Client_CentOS
         ;;
     *)
-        if [[ ${SysInfo_RelatedOS} = *debian* ]]; then
-            Install_WARP_Client_Debian
-        elif [[ ${SysInfo_RelatedOS} = *rhel* || ${SysInfo_RelatedOS} = *fedora* ]]; then
+        if [[ ${SysInfo_RelatedOS} = *rhel* || ${SysInfo_RelatedOS} = *fedora* ]]; then
             Install_WARP_Client_CentOS
         else
             log ERROR "This operating system is not supported."