From 3ab6ad7fcaaa317f210ef9b10d4cb6de0e0735a7 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Fri, 29 Nov 2024 22:13:51 +0800 Subject: [PATCH] =?UTF-8?q?opencloudos:=20=E4=BF=AE=E5=A4=8D=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E6=97=B6=E4=B8=8D=E6=98=AF=E4=B8=8B=E8=BD=BD=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/reinstall.sh b/reinstall.sh index d33829e..1612110 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -1161,7 +1161,8 @@ Continue? fi # iso - filename=$(curl -L $mirror | grep -oP "ubuntu-$releasever.*?-live-server-$basearch_alt.iso" | head -1) + filename=$(curl -L $mirror | grep -oP "ubuntu-$releasever.*?-live-server-$basearch_alt.iso" | + sort -uV | tail -1 | grep .) iso=$mirror/$filename # 在 ubuntu 20.04 上,file 命令检测 ubuntu 22.04 iso 结果是 DOS/MBR boot sector test_url $iso 'iso raw' @@ -1477,7 +1478,8 @@ Continue with DD? if is_use_cloud_image; then # ci dir=$releasever/images/$basearch - file=$(curl -L $mirror/$dir/ | grep -oP 'OpenCloudOS.*?\.qcow2' | head -1) + file=$(curl -L $mirror/$dir/ | grep -oP 'OpenCloudOS.*?\.qcow2' | + sort -uV | tail -1 | grep .) eval ${step}_img=$mirror/$dir/$file else : @@ -1490,7 +1492,8 @@ Continue with DD? if is_use_cloud_image; then # ci dir=$releasever/isos/GA/$basearch - file=$(curl -L $mirror/$dir/ | grep -oP 'AnolisOS.*?\.qcow2' | head -1) + file=$(curl -L $mirror/$dir/ | grep -oP 'AnolisOS.*?-ANCK\.qcow2' | + sort -uV | tail -1 | grep .) eval ${step}_img=$mirror/$dir/$file else : @@ -1505,7 +1508,8 @@ Continue with DD? fi if is_use_cloud_image; then # ci - name=$(curl -L "$mirror/" | grep -oE "openEuler-$releasever-LTS(-SP[0-9])?" | sort -u | tail -1) + name=$(curl -L "$mirror/" | grep -oE "openEuler-$releasever-LTS(-SP[0-9])?" | + sort -uV | tail -1 | grep .) eval ${step}_img=$mirror/$name/virtual_machine_img/$basearch/$name-$basearch.qcow2.xz else :