redhat: 自动获取 fedora 云镜像的小版本号

This commit is contained in:
bin456789 2023-08-01 22:30:03 +08:00
parent ff553e1170
commit 8dc14c44ca
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -385,17 +385,14 @@ setos() {
ci_image=$ci_mirror/AlmaLinux-$releasever-GenericCloud$alma_efi-latest.$basearch.qcow2
;;
"rocky") ci_image=$ci_mirror/Rocky-$releasever-GenericCloud-Base.latest.$basearch.qcow2 ;;
# TODO: 小版本号
"fedora")
ci_image=$ci_mirror/Fedora-Cloud-Base-$releasever-1.6.$basearch.raw.xz
ci_image_type=xz
filename=$(curl -L $ci_mirror | grep -oP "Fedora-Cloud-Base-$releasever.*?$basearch" | head -1)
# ci_image=$ci_mirror/$filename.raw.xz
ci_image=$ci_mirror/$filename.qcow2
;;
esac
eval ${step}_img=${ci_image}
if [ -n "$ci_image_type" ]; then
eval ${step}_img_type=${ci_image_type}
fi
else
# 传统安装
if [ "$localtest" = 1 ]; then