agent-install: raw URL 加时间戳,破 GitHub 缓存防拉旧版

This commit is contained in:
Muse
2026-10-20 01:37:23 +08:00
parent 5569055c17
commit 693bb959ce
+2 -1
View File
@@ -15,7 +15,8 @@ fetch() {
[[ -f "${NG_LOCAL_SRC}/$1" ]] || die "NG_LOCAL_SRC 目录缺少 $1" [[ -f "${NG_LOCAL_SRC}/$1" ]] || die "NG_LOCAL_SRC 目录缺少 $1"
cp -a "${NG_LOCAL_SRC}/$1" "$2" cp -a "${NG_LOCAL_SRC}/$1" "$2"
else else
curl -fL --retry 3 "https://raw.githubusercontent.com/${REPO}/${BRANCH}/$1" -o "$2" # 加时间戳破坏 GitHub raw 缓存,避免拉到旧版
curl -fL --retry 3 "https://raw.githubusercontent.com/${REPO}/${BRANCH}/$1?t=$(date +%s)" -o "$2"
fi fi
} }