From 4c57d53d1e0090aca2e4f98c552b2d76c1d12383 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 3 Jul 2022 23:04:50 +0800 Subject: [PATCH] up --- scripts/install.sh | 10 +++++----- scripts/install_cn.sh | 10 +++++----- scripts/update.sh | 7 +++++-- scripts/update_cn.sh | 7 +++++-- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 0199bf0e8..c923ed805 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -18,18 +18,21 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then +if grep -Eq "Ubuntu" /etc/*-release; then ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi -if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then +if grep -Eq "Debian" /etc/*-release; then ln -sf /bin/bash /bin/sh fi if [ ${_os} == "Darwin" ]; then OSNAME='macos' +elif grep -Eq "openSUSE" /etc/*-release; then + OSNAME='opensuse' + zypper refresh elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip @@ -47,12 +50,9 @@ elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then apt update -y apt install -y devscripts apt install -y wget zip unzip - apt install -y wget zip unzip elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then OSNAME='ubuntu' apt install -y wget zip unzip -elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then - OSNAME='raspbian' else OSNAME='unknow' fi diff --git a/scripts/install_cn.sh b/scripts/install_cn.sh index afb57ab25..04f8c18aa 100755 --- a/scripts/install_cn.sh +++ b/scripts/install_cn.sh @@ -18,18 +18,21 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then +if grep -Eq "Ubuntu" /etc/*-release; then ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi -if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then +if grep -Eq "Debian" /etc/*-release; then ln -sf /bin/bash /bin/sh fi if [ ${_os} == "Darwin" ]; then OSNAME='macos' +elif grep -Eq "openSUSE" /etc/*-release; then + OSNAME='opensuse' + zypper refresh elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip @@ -47,12 +50,9 @@ elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then apt update -y apt install -y devscripts apt install -y wget zip unzip - apt install -y wget zip unzip elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then OSNAME='ubuntu' apt install -y wget zip unzip -elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then - OSNAME='raspbian' else OSNAME='unknow' fi diff --git a/scripts/update.sh b/scripts/update.sh index 016ad88a8..2435a6778 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -14,17 +14,20 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then +if grep -Eq "Ubuntu" /etc/*-release; then ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi -if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then +if grep -Eq "Debian" /etc/*-release; then ln -sf /bin/bash /bin/sh fi if [ ${_os} == "Darwin" ]; then OSNAME='macos' +elif grep -Eq "openSUSE" /etc/*-release; then + OSNAME='opensuse' + zypper refresh elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip diff --git a/scripts/update_cn.sh b/scripts/update_cn.sh index 8e20424d0..6e44bccfe 100755 --- a/scripts/update_cn.sh +++ b/scripts/update_cn.sh @@ -14,17 +14,20 @@ if [ "$EUID" -ne 0 ] exit fi -if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then +if grep -Eq "Ubuntu" /etc/*-release; then ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi -if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then +if grep -Eq "Debian" /etc/*-release; then ln -sf /bin/bash /bin/sh fi if [ ${_os} == "Darwin" ]; then OSNAME='macos' +elif grep -Eq "openSUSE" /etc/*-release; then + OSNAME='opensuse' + zypper refresh elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip