From f19b84afebfbfa9e2a8a506e16271e27b44b9db3 Mon Sep 17 00:00:00 2001 From: Phil Clifford Date: Sat, 13 Nov 2021 10:50:49 +0000 Subject: [PATCH 1/3] Fix 212 Fallback to wget if zsync not available (#214) * first shot at falling back to wget * add fallback to list function * whitespace * Better message and shellcheck pacification --- quickget | 55 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/quickget b/quickget index 90628de..00e59d9 100755 --- a/quickget +++ b/quickget @@ -89,6 +89,16 @@ function list_csv() { local OPTION local OS local RELEASE + local ZS="" + local DL="" + +# check if we have a zsync installed somewhere + ZS="$(which zsync)" + if [ -x "${ZS}" ]; then + DL="zsync" + else + DL="wget" + fi echo "Display Name,OS,Release,Option,Downloader" for OS in $(os_support); do DISPLAY_NAME="$(pretty_name "${OS}")" @@ -106,13 +116,13 @@ function list_csv() { if [ "${OS}" == "macos" ]; then DOWNLOADER="macrecovery" elif [ "${OS}" == "ubuntu" ] && [ "${RELEASE}" == "canary" ]; then - DOWNLOADER="zsync" + DOWNLOADER="${DL}" elif [[ "${OS}" == *"ubuntu"* ]] && [ "${RELEASE}" == "devel" ]; then - DOWNLOADER="zsync" + DOWNLOADER="${DL}" elif [ "${OS}" == "garuda" ]; then - DOWNLOADER="zsync" + DOWNLOADER="${DL}" elif [[ "${OS}" == *"kdeneon"* ]]; then - DOWNLOADER="zsync" + DOWNLOADER="${DL}" else DOWNLOADER="wget" fi @@ -597,24 +607,33 @@ function zsync_get() { local OUT="" local URL="${1}" FILE="${URL##*/}" - if [ -n "${3}" ]; then - OUT="${3}" - else - OUT="${FILE}" - fi + local ZS="" - if ! mkdir -p "${DIR}" 2>/dev/null; then - echo "ERROR! Unable to create directory ${DIR}" - exit 1 - fi +# check if we have a zsync installed somewhere + ZS="$(which zsync)" + if [ -x "${ZS}" ]; then + if [ -n "${3}" ]; then + OUT="${3}" + else + OUT="${FILE}" + fi - if ! zsync "${URL}.zsync" -i "${DIR}/${OUT}" -o "${DIR}/${OUT}" 2>/dev/null; then - echo "ERROR! Failed to download ${URL}.zsync" + if ! mkdir -p "${DIR}" 2>/dev/null; then + echo "ERROR! Unable to create directory ${DIR}" exit 1 - fi + fi - if [ -e "${DIR}/${OUT}.zs-old" ]; then - rm "${DIR}/${OUT}.zs-old" + if ! zsync "${URL}.zsync" -i "${DIR}/${OUT}" -o "${DIR}/${OUT}" 2>/dev/null; then + echo "ERROR! Failed to download ${URL}.zsync" + exit 1 + fi + + if [ -e "${DIR}/${OUT}.zs-old" ]; then + rm "${DIR}/${OUT}.zs-old" + fi + else + echo "INFO: zsync not found, falling back to wget" + web_get "${ISO}" fi } From 31b485db44ab64045825ef28243227ad20fbdbcc Mon Sep 17 00:00:00 2001 From: Phil Clifford Date: Sat, 13 Nov 2021 10:51:16 +0000 Subject: [PATCH 2/3] Android option working (#221) * Correct generation of android config Missing android sections replaced. Fixes #219# * whitespace --- quickget | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/quickget b/quickget index 00e59d9..0c5680e 100755 --- a/quickget +++ b/quickget @@ -653,7 +653,10 @@ function make_vm_config() { IMAGE_FILE="${1}" ISO_FILE="${2}" - if [ "${OS}" == "archlinux" ]; then + if [ "${OS}" == "android" ]; then + GUEST="linux" + IMAGE_TYPE="iso" + elif [ "${OS}" == "archlinux" ]; then GUEST="linux" IMAGE_TYPE="iso" elif [ "${OS}" == "elementary" ]; then @@ -1409,7 +1412,9 @@ if [ -n "${2}" ]; then fi else echo -n "ERROR! You must specify a release: " - if [ "${OS}" == "archlinux" ]; then + if [ "${OS}" == "android" ]; then + releases_android + elif [ "${OS}" == "archlinux" ]; then releases_archlinux elif [ "${OS}" == "elementary" ]; then releases_elementary From ff0559f0cff08685228847f33b895f9d9b980ca1 Mon Sep 17 00:00:00 2001 From: navycat <4epTeH0K5@list.ru> Date: Tue, 9 Nov 2021 19:12:38 +0300 Subject: [PATCH 3/3] Removed overhead virtio-serial-pci --- quickemu | 1 - 1 file changed, 1 deletion(-) diff --git a/quickemu b/quickemu index 3d7402a..5c5a4ee 100755 --- a/quickemu +++ b/quickemu @@ -905,7 +905,6 @@ function vm_boot() { -device usb-ccid -chardev spicevmc,id=ccid,name=smartcard -device ccid-card-passthru,chardev=ccid - -device virtio-serial-pci -chardev spiceport,id=webdav0,name=org.spice-space.webdav.0 -device virtserialport,chardev=webdav0,name=org.spice-space.webdav.0) fi