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>
This commit is contained in:
Alex Genovese 2024-10-19 23:47:04 +02:00 committed by GitHub
parent 9d4b82db20
commit 1638b7a721
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -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