新增系统升级脚本,支持 Debian 和 Alpine 系统
This commit is contained in:
17
upgrade.sh
Normal file
17
upgrade.sh
Normal file
@ -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
|
Reference in New Issue
Block a user