2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 09:13:49 +08:00

feat: 安装脚本优化

This commit is contained in:
耗子
2023-10-23 20:15:06 +08:00
parent af21a6307e
commit 5ec25deaf6

View File

@@ -181,13 +181,13 @@ Init_Panel() {
# 下载面板zip包并解压
if [ "${ARCH}" == "x86_64" ]; then
if ${inChina}; then
panelZip=$(curl -sSL "https://jihulab.com/api/v4/projects/haozi-team%2Fpanel/releases" | jq -r '.[0].assets.links[] | select(.name | contains("amd64v2")) | .direct_asset_url')
panelZip=$(curl -sSL "https://jihulab.com/api/v4/projects/haozi-team%2Fpanel/releases/permalink/latest" | jq -r '.assets.links[] | select(.name | contains("amd64v2")) | .direct_asset_url')
else
panelZip=$(curl -sSL "https://api.github.com/repos/haozi-team/panel/releases/latest" | jq -r '.assets[] | select(.name | contains("amd64v2")) | .browser_download_url')
fi
elif [ "${ARCH}" == "aarch64" ]; then
if ${inChina}; then
panelZip=$(curl -sSL "https://jihulab.com/api/v4/projects/haozi-team%2Fpanel/releases" | jq -r '.[0].assets.links[] | select(.name | contains("arm64")) | .direct_asset_url')
panelZip=$(curl -sSL "https://jihulab.com/api/v4/projects/haozi-team%2Fpanel/releases/permalink/latest" | jq -r '.assets.links[] | select(.name | contains("arm64")) | .direct_asset_url')
else
panelZip=$(curl -sSL "https://api.github.com/repos/haozi-team/panel/releases/latest" | jq -r '.assets[] | select(.name | contains("arm64")) | .browser_download_url')
fi