From 4a8eaddbe86b21673664a20f1a573227bd2fb27a Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Tue, 17 Jan 2023 18:26:31 +0100 Subject: [PATCH] Fixed Ubuntu 22.04 downloader --- Installer-Ubuntu22.04.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Installer-Ubuntu22.04.sh b/Installer-Ubuntu22.04.sh index 82bb766..848e55d 100644 --- a/Installer-Ubuntu22.04.sh +++ b/Installer-Ubuntu22.04.sh @@ -9,7 +9,10 @@ source Locations.conf TargetDir="$WWWStore/Installer/Ubuntu/22.04" [ -d "$TargetDir" ] || mkdir -p $TargetDir -wget https://releases.ubuntu.com/jammy/ubuntu-22.04-live-server-amd64.iso -O $TargetDir/Ubuntu22.04.iso +#Works only if a version has a minor release (22.04.1) so 22.04 will not be detected +UbuntuVersion=$(wget -q https://releases.ubuntu.com/ -O-|grep jammy\/ | head -n 1 | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+') + +wget "https://releases.ubuntu.com/jammy/ubuntu-$UbuntuVersion-live-server-amd64.iso" -O $TargetDir/Ubuntu22.04.iso isoinfo -i $TargetDir/Ubuntu22.04.iso -R -x /casper/vmlinuz > $TargetDir/vmlinuz isoinfo -i $TargetDir/Ubuntu22.04.iso -R -x /casper/initrd > $TargetDir/initrd