From 4f1a91d391066cc90fee585b0d1583cf3c96fb9b Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Sat, 29 Jul 2023 13:33:35 +0800 Subject: [PATCH] os support --- install/install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/install/install.sh b/install/install.sh index 3d1990b6..718c2bea 100644 --- a/install/install.sh +++ b/install/install.sh @@ -93,7 +93,9 @@ if [ "$os_type" == 'CentOS Stream' ] ;then fi if [ "$os_type" == 'Rocky Linux' ] ;then - if [ "$os_version" =~ ^[^8] ]; then + if [ "${os_version:0:1}" == "8" ]; then + echo "" + else echo "This app only supported on Rocky Linux 8" exit 1 fi @@ -107,14 +109,14 @@ if [ "$os_type" == 'Fedora' ];then fi if [ "$os_type" == 'Redhat' ];then - if [ "${os_version:0:1}" == "9" ]; then + if [ "${os_version:0:1}" != "7" ] && [ "${os_version:0:1}" != "8" ]; then echo "This app only supported on Redhat 7,8" exit 1 fi fi if [ "$os_type" == 'Ubuntu' ];then - if [ "$os_version" != "22.04" ] and [ "$os_version" != "20.04" ] and [ "$os_version" != "18.04" ]; then + if [ "$os_version" != "22.04" ] && [ "$os_version" != "20.04" ] && [ "$os_version" != "18.04" ]; then echo "This app only supported on Ubuntu 22.04,20.04,18.04" exit 1 fi