From d4075cc93bd309c41533aabfb9c8c880450cfdac Mon Sep 17 00:00:00 2001 From: mini2024 Date: Tue, 11 Mar 2025 22:53:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=B3=BB=E7=BB=9F=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E8=84=9A=E6=9C=AC=EF=BC=8C=E6=94=AF=E6=8C=81=20Debian?= =?UTF-8?q?=20=E5=92=8C=20Alpine=20=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upgrade.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 upgrade.sh diff --git a/upgrade.sh b/upgrade.sh new file mode 100644 index 0000000..89a3653 --- /dev/null +++ b/upgrade.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# +# ... +# +# 使用方法: +# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/main/upgrade.sh"; curl -fsSL "$URL" | bash || wget -q -O - "$URL" | bash + +if [ -f /etc/debian_version ]; then + SYSTEM_TYPE="debian" + source <(curl -fsSL git.1-h.cc/Scripts/Linux/raw/branch/main/debian/upgrade.sh) +elif [ -f /etc/alpine-release ]; then + SYSTEM_TYPE="alpine" + source <(curl -fsSL git.1-h.cc/Scripts/Linux/raw/branch/main/alpine/upgrade.sh) +else + echo "不支持的系统类型" + exit 1 +fi \ No newline at end of file