From 6dc4502825c06aad9d1e9492184a047b0cf9f51e Mon Sep 17 00:00:00 2001 From: Lennart Pieperjohanns Date: Sun, 29 Sep 2024 17:54:02 +0200 Subject: [PATCH] Adding Fedora ISO download. --- core/tabs/utils/create-bootable-usb.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/core/tabs/utils/create-bootable-usb.sh b/core/tabs/utils/create-bootable-usb.sh index 0e59440d..1abc9e82 100644 --- a/core/tabs/utils/create-bootable-usb.sh +++ b/core/tabs/utils/create-bootable-usb.sh @@ -66,6 +66,14 @@ fetch_debian_latest_iso() { printf "%b\n" "${GREEN} Selected Debian Linux (latest) ISO URL: ${RC} $DEBIAN_URL" } +# Function to fetch the latest Fedora Workstation ISO +fetch_fedora_latest_iso() { + FEDORA_BASE_URL="https://download.fedoraproject.org/pub/fedora/linux/releases/40/Workstation/x86_64/iso/" + FEDORA_ISO=$(curl -s -L "$FEDORA_BASE_URL" | grep -oP 'Fedora-Workstation-Live-x86_64-[\d.-]+\.iso' | sort -V | tail -1) + FEDORA_URL="${FEDORA_BASE_URL}${FEDORA_ISO}" + printf "%b\n" "${GREEN} Selected Fedora Workstation (latest) ISO URL: ${RC} $FEDORA_URL" +} + # Function to ask whether to use local or online ISO choose_iso_source() { printf "%b\n" "${YELLOW} Do you want to use a local ISO or download online? ${RC}" @@ -101,8 +109,9 @@ fetch_iso_urls() { printf "%b\n" "1) Arch Linux (latest)" printf "%b\n" "2) Arch Linux (older versions)" printf "%b\n" "3) Debian Linux (latest)" + printf "%b\n" "4) Fedora 40 Workstation (latest)" printf "\n" - printf "%b" "Select the ISO you want to download (1-3): " + printf "%b" "Select the ISO you want to download (1-4): " read -r ISO_OPTION case $ISO_OPTION in @@ -118,6 +127,10 @@ fetch_iso_urls() { fetch_debian_latest_iso ISO_URL=$DEBIAN_URL ;; + 4) + fetch_fedora_latest_iso + ISO_URL=$FEDORA_URL + ;; *) printf "%b\n" "${RED}Invalid option selected.${RC}" exit 1