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 :