refactor: 将脚本下载链接中的分支从 main 更新为 2026

This commit is contained in:
严浩
2026-03-09 17:57:47 +08:00
parent 367a37f29b
commit efcc19e914
5 changed files with 7 additions and 7 deletions

4
1.sh
View File

@@ -3,8 +3,8 @@
# ...
#
# 使用方法:
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/main/1.sh"; curl -fsSL "$URL" | bash
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/main/1.sh"; wget -q -O - "$URL" | bash
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/2026/1.sh"; curl -fsSL "$URL" | bash
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/2026/1.sh"; wget -q -O - "$URL" | bash
set -e # 遇到错误即退出
trap 'echo "Error on line $LINENO"' ERR

View File

@@ -4,7 +4,7 @@
# 功能:更新软件包、清理缓存、检查服务状态
#
# 使用方法:
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/main/alpine/upgrade.sh"; wget -q -O - "$URL" | bash
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/2026/alpine/upgrade.sh"; wget -q -O - "$URL" | bash
cat <<EOF > /etc/apk/repositories
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main

View File

@@ -101,7 +101,7 @@ docker_exec() {
set -- "$@" --shell="$EXEC_SHELL"
fi
curl -fsSL "https://Git.1-H.CC/Scripts/Linux/raw/branch/main/docker-exec-via-sock.sh" | sh -s -- "$@"
curl -fsSL "https://git.1-h.cc/Scripts/Linux/raw/branch/2026/docker-exec-via-sock.sh" | sh -s -- "$@"
}
while [ "$#" -gt 0 ]; do
@@ -305,7 +305,7 @@ printf '\n' >&2
log "数据库备份完成"
log "正在调用远程清理脚本,前缀为 '$BACKUP_PREFIX',目录为 $BACKUP_DIR"
if ! curl -fsSL "https://Git.1-H.CC/Scripts/Linux/raw/branch/main/database-dump-cleanup.sh" | \
if ! curl -fsSL "https://git.1-h.cc/Scripts/Linux/raw/branch/2026/database-dump-cleanup.sh" | \
sh -s -- --prefix="$BACKUP_PREFIX" --dir="$BACKUP_DIR"; then
log "清理脚本失败"
fi

2
debian/upgrade.sh vendored
View File

@@ -3,7 +3,7 @@
# ...
#
# 使用方法:
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/main/debian/upgrade.sh"; curl -fsSL "$URL" | bash
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/2026/debian/upgrade.sh"; curl -fsSL "$URL" | bash
# 设置非交互式环境变量
export DEBIAN_FRONTEND=noninteractive

View File

@@ -3,7 +3,7 @@
# ...
#
# 使用方法:
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/main/upgrade.sh"; curl -fsSL "$URL" | bash
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/2026/upgrade.sh"; curl -fsSL "$URL" | bash
if [ -f /etc/debian_version ]; then
SYSTEM_TYPE="debian"