This commit is contained in:
Lennart Pieperjohanns 2024-10-24 22:38:52 +02:00 committed by GitHub
commit c33af762be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 23 additions and 3 deletions

View File

@ -66,6 +66,19 @@ fetch_debian_latest_iso() {
printf "%b\n" "${GREEN} Selected Debian Linux (latest) ISO URL: ${RC} $DEBIAN_URL" printf "%b\n" "${GREEN} Selected Debian Linux (latest) ISO URL: ${RC} $DEBIAN_URL"
} }
fetch_fedora_latest_iso() {
FEDORA_URL=$(curl -s 'https://www.fedoraproject.org/releases.json' |
grep -o '"link": "[^"]*' |
sed -e 's/"link": "//' |
awk -v version="40" -v arch="x86_64" -v variant="Workstation" ' BEGIN { FS="," }
{
if ($0 ~ version && $0 ~ arch && $0 ~ variant && $0 ~ "Live-x86_64")
{ print $0 }
}' |
head -n 1)
printf "%b\n" "${GREEN} Selected Fedora Workstation (latest) ISO URL:${RC} $FEDORA_URL"
}
# Function to ask whether to use local or online ISO # Function to ask whether to use local or online ISO
choose_iso_source() { choose_iso_source() {
printf "%b\n" "${YELLOW} Do you want to use a local ISO or download online? ${RC}" printf "%b\n" "${YELLOW} Do you want to use a local ISO or download online? ${RC}"
@ -101,8 +114,9 @@ fetch_iso_urls() {
printf "%b\n" "1) Arch Linux (latest)" printf "%b\n" "1) Arch Linux (latest)"
printf "%b\n" "2) Arch Linux (older versions)" printf "%b\n" "2) Arch Linux (older versions)"
printf "%b\n" "3) Debian Linux (latest)" printf "%b\n" "3) Debian Linux (latest)"
printf "%b\n" "4) Fedora 40 Workstation (latest)"
printf "\n" 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 read -r ISO_OPTION
case $ISO_OPTION in case $ISO_OPTION in
@ -118,6 +132,10 @@ fetch_iso_urls() {
fetch_debian_latest_iso fetch_debian_latest_iso
ISO_URL=$DEBIAN_URL ISO_URL=$DEBIAN_URL
;; ;;
4)
fetch_fedora_latest_iso
ISO_URL=$FEDORA_URL
;;
*) *)
printf "%b\n" "${RED}Invalid option selected.${RC}" printf "%b\n" "${RED}Invalid option selected.${RC}"
exit 1 exit 1
@ -157,7 +175,7 @@ write_iso(){
printf "%b" "${RED}WARNING: This will erase all data on ${USB_DEVICE}. Are you sure you want to continue? (y/N): ${RC}" printf "%b" "${RED}WARNING: This will erase all data on ${USB_DEVICE}. Are you sure you want to continue? (y/N): ${RC}"
read -r CONFIRMATION read -r CONFIRMATION
if [ "$CONFIRMATION" != "yes" ]; then if [ "$(echo "$CONFIRMATION" | tr '[:upper:]' '[:lower:]')" != "yes" ] && [ "$(echo "$CONFIRMATION" | tr '[:upper:]' '[:lower:]')" != "y" ]; then
printf "%b\n" "${YELLOW}Operation cancelled.${RC}" printf "%b\n" "${YELLOW}Operation cancelled.${RC}"
exit 1 exit 1
fi fi

View File

@ -123,6 +123,7 @@ task_list = "I SS"
[[data]] [[data]]
name = "Bootable USB Creator" name = "Bootable USB Creator"
description = "Makes a USB Stick that can be used to install the selected Linux distribution"
script = "create-bootable-usb.sh" script = "create-bootable-usb.sh"
task_list = "D" task_list = "D"

View File

@ -145,6 +145,7 @@ For more information visit: https://rpmfusion.org/
- **Auto Mount Drive**: This utility is designed to help with automating the process of mounting a drive on to your system. - **Auto Mount Drive**: This utility is designed to help with automating the process of mounting a drive on to your system.
- **Bluetooth Manager**: This utility is designed to manage bluetooth in your system - **Bluetooth Manager**: This utility is designed to manage bluetooth in your system
- **Bootable USB Creator**: Makes a USB Stick that can be used to install the selected Linux distribution
- **Numlock on Startup**: This utility is designed to configure auto enabling of numlock on boot - **Numlock on Startup**: This utility is designed to configure auto enabling of numlock on boot
- **Ollama**: This utility is designed to manage ollama in your system - **Ollama**: This utility is designed to manage ollama in your system
- **Service Manager**: This utility is designed to manage services in your system - **Service Manager**: This utility is designed to manage services in your system