From 1638b7a721108dd57a0fee35eb7cb9a12fe1b54f Mon Sep 17 00:00:00 2001 From: Alex Genovese Date: Sat, 19 Oct 2024 23:47:04 +0200 Subject: [PATCH] fix: Archcraft and ReactOS ISO naming and editions quoting (#1468) * proper fix for 'editions' quotes needed on editions function call to prevent globbing .... * fix archcraft download otherwise just downloads with filename 'download' without even a .iso extension * refactor: Use web_redirect function to get archcraft URL --------- Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com> --- quickget | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/quickget b/quickget index 6591fdc..757fd9b 100755 --- a/quickget +++ b/quickget @@ -1222,7 +1222,7 @@ function web_redirect() { local URL="${1}" # Check for URL redirections # Output to nonexistent directory so the download fails fast - REDIRECT_URL=$(curl --silent --location --fail --write-out '%{url_effective}' --output /var/cache/${RANDOM}/${RANDOM} "${URL}") + REDIRECT_URL=$(curl --silent --location --fail --write-out '%{url_effective}' --output /var/cache/${RANDOM}/${RANDOM} "${URL}" ) if [ "${REDIRECT_URL}" != "${URL}" ]; then echo "${REDIRECT_URL}" else @@ -1548,6 +1548,7 @@ function get_archcraft() { local HASH="" local URL="" URL="https://sourceforge.net/projects/archcraft/files/${RELEASE}/download" + URL="$(web_redirect "${URL}" | cut -d? -f1)" echo "${URL} ${HASH}" } @@ -3282,6 +3283,7 @@ function create_vm() { unzip -qo "${VM_PATH}/${ISO}" -d "${VM_PATH}" rm -f "${VM_PATH}/${ISO}" ISO="$(ls -1 "${VM_PATH}/"*.iso)" + ISO="$(basename "${ISO}")" fi;; kolibrios) if [[ ${ISO} = *".7z" ]]; then @@ -3298,6 +3300,7 @@ function create_vm() { unzip -qo "${VM_PATH}/${ISO}" -d "${VM_PATH}" rm -f "${VM_PATH}/${ISO}" ISO="$(ls -1 "${VM_PATH}/"*.iso)" + ISO="$(basename "${ISO}")" fi;; esac make_vm_config "${ISO}" @@ -3537,7 +3540,7 @@ if [ -n "${2}" ]; then fi else show_os_info "${OS}" - echo -e " - Editions:\t$(editions_${OS} | fmt -w 80)" + echo -e " - Editions:\t$("editions_${OS}" | fmt -w 80)" echo -e "\nERROR! You must specify an edition." exit 1 fi