From b941221ec1f56400198e2904b723ae3410b50e2f Mon Sep 17 00:00:00 2001 From: bin456789 Date: Wed, 22 Jul 2026 19:26:35 +0800 Subject: [PATCH] =?UTF-8?q?fnos:=20=E6=9B=B4=E6=96=B0=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=EF=BC=8C=E6=B7=BB=E5=8A=A0=20arm=20=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #651 --- reinstall.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/reinstall.sh b/reinstall.sh index f3f85b1..1ce22cd 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -1646,21 +1646,33 @@ Continue with DD? done if [ -z "$iso" ]; then + local download_page sign_page if [ "$FLYGOOS" = 1 ]; then - iso=$(curl -L "https://fygonas.com/download" | - grep -o 'https://[^"]*\.iso' | head -1 | grep .) + download_page=https://fygonas.com/download + # sign_page=https://fygonas.com/asset/download-sign else - # 对于同一行有多个成功匹配,grep -m1 无效 - iso=$(curl -L "https://fnnas.com/download$([ "$basearch" = aarch64 ] && echo -arm)" | - grep -o 'https://[^"]*\.iso' | head -1 | grep .) + download_page=https://fnnas.com/download$([ "$basearch" = aarch64 ] && echo -arm || true) + sign_page=https://fnnas.com/asset/download-sign + fi + # fnos_Mainland-PE_x86_1.2.0203_2149.iso + # fnos_Mainland-PE_arm_1.1.31_armsr_1366.iso + # fygoos_PE_x86_1.2.0203_2150.iso + # fygoos_PE_arm_1.2.0007_armsr_1837.iso + + # 对于同一行有多个成功匹配,grep -m1 无效 + iso=$(curl -L "$download_page" | grep -o 'https://[^"]*\.iso' | + grep "$([ "$basearch" = aarch64 ] && echo _armsr_ || echo _x86_)" | + head -1 | grep .) + + if [ -n "$sign_page" ]; then # curl 7.82.0+ - # curl -L --json '{"url":"'$iso'"}' https://www.fnnas.com/api/download-sign + # curl -L --json '{"url":"'$iso'"}' https://fnnas.com/asset/download-sign iso=$(curl -L \ -d '{"url":"'$iso'"}' \ -H 'Content-Type: application/json' \ - https://www.fnnas.com/api/download-sign | + "$sign_page" | grep -o 'https://[^"]*') fi fi