From acebe047322c4eac407a4ca9e9c19199e71321ae Mon Sep 17 00:00:00 2001 From: spiritysdx Date: Thu, 4 Jul 2024 12:59:36 +0800 Subject: [PATCH] update --- README.md | 2 +- README_EN.md | 2 +- goecs.sh | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6a15b6d6..4a563e18 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Shell版本: https://github.com/spiritLHLS/ecs 已支持的系统: Linux、Windows -待支持的系统(存在硬件测试BUG未修复): MacOS +待支持的系统(存在硬件测试BUG未修复): MacOS、Alpine ## 功能 diff --git a/README_EN.md b/README_EN.md index f0eafc9a..06bd85f6 100644 --- a/README_EN.md +++ b/README_EN.md @@ -18,7 +18,7 @@ Pending support (due to unsupported dependencies): s390x Supported systems: Linux, Windows -Pending support (due to unresolved hardware testing bugs): MacOS +Pending support (due to unresolved hardware testing bugs): MacOS、Alpine ## Features diff --git a/goecs.sh b/goecs.sh index 6ff4da1b..aedf0b1e 100644 --- a/goecs.sh +++ b/goecs.sh @@ -233,7 +233,9 @@ env_check() { PACKAGE_INSTALL=("apt-get -y install" "apt-get -y install" "yum -y install" "yum -y install" "yum -y install" "pacman -Sy --noconfirm --needed" "pkg install -y" "apk add") PACKAGE_REMOVE=("apt-get -y remove" "apt-get -y remove" "yum -y remove" "yum -y remove" "yum -y remove" "pacman -Rsc --noconfirm" "pkg delete" "apk del") PACKAGE_UNINSTALL=("apt-get -y autoremove" "apt-get -y autoremove" "yum -y autoremove" "yum -y autoremove" "yum -y autoremove" "" "pkg autoremove" "apk autoremove") - if [ -s /etc/os-release ]; then + if [ -f /etc/alpine-release ]; then + SYS="alpine" + elif [ -s /etc/os-release ]; then SYS="$(grep -i pretty_name /etc/os-release | cut -d \" -f2)" elif [ -x "$(type -p hostnamectl)" ]; then SYS="$(hostnamectl | grep -i system | cut -d : -f2)" @@ -245,8 +247,6 @@ env_check() { SYS="$(grep . /etc/redhat-release)" elif [ -s /etc/issue ]; then SYS="$(grep . /etc/issue | cut -d '\' -f1 | sed '/^[ ]*$/d')" - elif [ -f /etc/alpine-release ]; then - SYS="alpine" else SYS="$(uname -s)}" fi