Skip to content

Commit

Permalink
fix: Archcraft and ReactOS ISO naming and editions quoting (#1468)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
TuxVinyards and lj3954 authored Oct 19, 2024
1 parent 9d4b82d commit 1638b7a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions quickget
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}"
}

Expand Down Expand Up @@ -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
Expand All @@ -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}"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1638b7a

Please sign in to comment.