agent-install: raw URL 加时间戳,破 GitHub 缓存防拉旧版
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user