quickget uses static name for Ubuntu devel downloads

quickget now uses a static name for devel downloads via zsync so they can automatically jump release series.
pull/61/head
Martin Wimpress 3 years ago
parent bf461eb966
commit f20fe5f514
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
  1. 14
      quickget

@ -40,10 +40,17 @@ function web_get() {
function zsync_get() {
local DIR="${2}"
local FILE=""
local OUT=""
local URL="${1}"
FILE="${URL##*/}"
if [ -n "${3}" ]; then
OUT="${3}"
else
OUT="${FILE}"
fi
mkdir -p "${DIR}" 2>/dev/null
if ! zsync "${URL}.zsync" -o "${DIR}/${FILE}"; then
if ! zsync "${URL}.zsync" -i "${DIR}/${OUT}" -o "${DIR}/${OUT}"; then
echo "ERROR! Failed to download ${URL}.zsync"
exit 1
fi
@ -193,7 +200,8 @@ function get_ubuntu() {
echo "Downloading "${URL}/${ISO}"..."
if [ "${RELEASE}" == "devel" ]; then
zsync_get "${URL}/${ISO}" "${VM_PATH}"
zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-${RELEASE}.iso"
make_vm_config "${OS}-${RELEASE}.iso"
else
web_get "${URL}/${ISO}" "${VM_PATH}"
echo "Checking SHA256SUMS..."
@ -205,9 +213,9 @@ function get_ubuntu() {
echo "All good."
fi
cd ..
make_vm_config "${ISO}"
fi
make_vm_config "${ISO}"
start_vm_info
}

Loading…
Cancel
Save