From 58137621689cf00a03de52b277dabd72452031db Mon Sep 17 00:00:00 2001 From: Penelope Gwen Date: Tue, 22 Apr 2025 23:00:02 -0700 Subject: [PATCH] New backup 2025-04-22 23:00:02 --- default/home/Scripts/iso_updater.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/default/home/Scripts/iso_updater.sh b/default/home/Scripts/iso_updater.sh index ec14b3b..88b11c4 100755 --- a/default/home/Scripts/iso_updater.sh +++ b/default/home/Scripts/iso_updater.sh @@ -1,16 +1,27 @@ #!/usr/bin/env bash +iso_download(){ +#args: +# $1 = iso url +# $2 = iso filename +# $3 = iso path + printf '\n\nDownloading %s...\n' "${2}" + printf 'url: %s%s' "${1}" "${2}" + printf 'destination file: %s%s\n' "${3}" "${2}" +} + #debian stable debian_stable_iso_root='cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/' debian_stable_iso_list=$(curl -s "ftp://${debian_stable_iso_root}" | grep '.iso$' | awk '{print $9}' | grep -e 'kde' -e 'standard' -e 'lxqt' -e 'xfce') for i in ${debian_stable_iso_list[@]};do - echo "http://${debian_stable_iso_root}${i}" + iso_download "http://${debian_stable_iso_root}${i}" "${i}" "disk_images/operating_systems/linux/debian/" done debian_testing_iso_root='cdimage.debian.org/cdimage/weekly-live-builds/amd64/iso-hybrid/' debian_testing_iso_list=$(curl -s "ftp://${debian_testing_iso_root}" | grep '.iso$' | awk '{print $9}' | grep -e 'standard') for i in ${debian_testing_iso_list[@]};do - echo "http://${debian_testing_iso_root}${i}" + printf '\n\nDownloading %s...\n' "${i}" + iso_download "http://${debian_testing_iso_root}${i}" "${i}" "" done