From 5e2f46444c0607fcb7afa5f4b5def092aea0dead Mon Sep 17 00:00:00 2001 From: bin456789 Date: Tue, 10 Mar 2026 01:06:10 +0800 Subject: [PATCH] =?UTF-8?q?fnos:=20=E5=85=81=E8=AE=B8=E6=8C=87=E5=AE=9A=20?= =?UTF-8?q?iso=20=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #567 --- reinstall.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/reinstall.sh b/reinstall.sh index 2534ccb..1b8ef1b 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -1687,18 +1687,20 @@ Continue with DD? fi done - # 对于同一行有多个成功匹配,grep -m1 无效 - iso=$(curl -L "https://fnnas.com/download$([ "$basearch" = aarch64 ] && echo -arm)" | - grep -o 'https://[^"]*\.iso' | head -1 | grep .) + if [ -z "$iso" ]; then + # 对于同一行有多个成功匹配,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://[^"]*') + iso=$(curl -L \ + -d '{"url":"'$iso'"}' \ + -H 'Content-Type: application/json' \ + https://www.fnnas.com/api/download-sign | + grep -o 'https://[^"]*') + fi test_url "$iso" iso eval "${step}_iso='$iso'"