From ff4b6de2585f8cd23cb176ff8357046eeea6d097 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Thu, 12 Feb 2026 22:27:20 +0800 Subject: [PATCH] =?UTF-8?q?fnos:=20=E4=BF=AE=E5=A4=8D=E9=A3=9E=E7=89=9B?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #555 fixes #557 --- reinstall.sh | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/reinstall.sh b/reinstall.sh index 1c77d6a..c673a30 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -1654,25 +1654,18 @@ Continue with DD? fi done - if [ "$basearch" = aarch64 ]; then - if [ -z "$iso" ]; then - IFS= read -r -p "ISO Link: " iso - if [ -z "$iso" ]; then - error_and_exit "ISO Link is empty." - fi - fi - else - iso=$(curl -L https://fnnas.com/ | grep -o -m1 'https://[^"]*\.iso') + # 对于同一行有多个成功匹配,grep -m1 无效 + iso=$(curl -L "https://fnnas.com/download$([ "$basearch" = aarch64 ] && echo -arm)" | + grep -o 'https://[^"]*\.iso' | head -1 | grep .) - # curl 7.82.0+ - # curl -L --json '{"url":"'$iso'"}' https://www.fnnas.com/api/download-sign + # curl 7.82.0+ + # curl -L --json '{"url":"'$iso'"}' https://www.fnnas.com/api/download-sign - iso=$(curl -L \ - -d '{"url":"'$iso'"}' \ - -H 'Content-Type: application/json' \ - https://www.fnnas.com/api/download-sign | - grep -o 'https://[^"]*') - fi + iso=$(curl -L \ + -d '{"url":"'$iso'"}' \ + -H 'Content-Type: application/json' \ + https://www.fnnas.com/api/download-sign | + grep -o 'https://[^"]*') test_url "$iso" iso eval "${step}_iso='$iso'"