This commit is contained in:
ChristianSwift committed 2026-02-06 11:26:58 +08:00
1 parent 15585abd0e
commit 388a2ab226
1 file changed
+4 -5
+4 -5
View File
@@ -17,7 +17,7 @@ install() {
case "${STATUS}" in
"000")
rm -f "${file}"
echo "Error: ${STATUS}, Failed to connect to GitHub. Please check your network and try again."
echo "Error: ${STATUS}, Failed to connect to Gitee. Please check your network and try again."
return 1
;;
"200")
@@ -26,7 +26,7 @@ install() {
;;
"403")
rm -f "${file}"
echo "Error: ${STATUS}, Access forbidden to the package on GitHub."
echo "Error: ${STATUS}, Access forbidden to the package on Gitee."
return 1
;;
"404")
@@ -60,9 +60,8 @@ install() {
if [ ! -d "${WORK_PATH}/patch/${VERSION}/${SS_NAME}" ]; then
REPO="${REPO:-"ohyeah521/Surveillance-Station"}"
BRANCH="${BRANCH:-"main"}"
# 检查版本是否存在
VERURL="${GPROXY}https://github.com/${REPO}/tree/${BRANCH}/patch/${VERSION}/${SS_NAME}"
VERURL="${GPROXY}https://gitee.com/christianswift/surveillance-station-9/tree/${BRANCH}/patch/${VERSION}/${SS_NAME}"
STATUS="$(curl -skL ${CPROXY:+-x ${CPROXY}} -w "%{http_code}" "${VERURL}" -o /dev/null 2>/dev/null)"
STATUS="${STATUS: -3}"
case "${STATUS}" in
@@ -89,7 +88,7 @@ install() {
esac
# 获取 patch 文件
URL_FIX="${GPROXY}https://github.com/${REPO}/raw/${BRANCH}/patch/${VERSION}/${SS_NAME}"
URL_FIX="${GPROXY}https://gitee.com/christianswift/surveillance-station-9/raw/${BRANCH}/patch/${VERSION}/${SS_NAME}"
for F in "${PATCH_FILES[@]}"; do
_get_files "${URL_FIX}/${F}" "${WORK_PATH}/patch/${VERSION}/${SS_NAME}/${F}"
if [ $? -ne 0 ]; then