From f20fe5f51414114d0ae25a21125d23915049c7e2 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 28 Sep 2021 02:13:08 +0100 Subject: [PATCH] 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. --- quickget | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/quickget b/quickget index 0ae1ddd..1655212 100755 --- a/quickget +++ b/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 }