mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1423b272c3
1 changed files with 44 additions and 20 deletions
36
quickget
36
quickget
|
@ -89,6 +89,16 @@ function list_csv() {
|
||||||
local OPTION
|
local OPTION
|
||||||
local OS
|
local OS
|
||||||
local RELEASE
|
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"
|
echo "Display Name,OS,Release,Option,Downloader"
|
||||||
for OS in $(os_support); do
|
for OS in $(os_support); do
|
||||||
DISPLAY_NAME="$(pretty_name "${OS}")"
|
DISPLAY_NAME="$(pretty_name "${OS}")"
|
||||||
|
@ -106,13 +116,13 @@ function list_csv() {
|
||||||
if [ "${OS}" == "macos" ]; then
|
if [ "${OS}" == "macos" ]; then
|
||||||
DOWNLOADER="macrecovery"
|
DOWNLOADER="macrecovery"
|
||||||
elif [ "${OS}" == "ubuntu" ] && [ "${RELEASE}" == "canary" ]; then
|
elif [ "${OS}" == "ubuntu" ] && [ "${RELEASE}" == "canary" ]; then
|
||||||
DOWNLOADER="zsync"
|
DOWNLOADER="${DL}"
|
||||||
elif [[ "${OS}" == *"ubuntu"* ]] && [ "${RELEASE}" == "devel" ]; then
|
elif [[ "${OS}" == *"ubuntu"* ]] && [ "${RELEASE}" == "devel" ]; then
|
||||||
DOWNLOADER="zsync"
|
DOWNLOADER="${DL}"
|
||||||
elif [ "${OS}" == "garuda" ]; then
|
elif [ "${OS}" == "garuda" ]; then
|
||||||
DOWNLOADER="zsync"
|
DOWNLOADER="${DL}"
|
||||||
elif [[ "${OS}" == *"kdeneon"* ]]; then
|
elif [[ "${OS}" == *"kdeneon"* ]]; then
|
||||||
DOWNLOADER="zsync"
|
DOWNLOADER="${DL}"
|
||||||
else
|
else
|
||||||
DOWNLOADER="wget"
|
DOWNLOADER="wget"
|
||||||
fi
|
fi
|
||||||
|
@ -597,6 +607,11 @@ function zsync_get() {
|
||||||
local OUT=""
|
local OUT=""
|
||||||
local URL="${1}"
|
local URL="${1}"
|
||||||
FILE="${URL##*/}"
|
FILE="${URL##*/}"
|
||||||
|
local ZS=""
|
||||||
|
|
||||||
|
# check if we have a zsync installed somewhere
|
||||||
|
ZS="$(which zsync)"
|
||||||
|
if [ -x "${ZS}" ]; then
|
||||||
if [ -n "${3}" ]; then
|
if [ -n "${3}" ]; then
|
||||||
OUT="${3}"
|
OUT="${3}"
|
||||||
else
|
else
|
||||||
|
@ -616,6 +631,10 @@ function zsync_get() {
|
||||||
if [ -e "${DIR}/${OUT}.zs-old" ]; then
|
if [ -e "${DIR}/${OUT}.zs-old" ]; then
|
||||||
rm "${DIR}/${OUT}.zs-old"
|
rm "${DIR}/${OUT}.zs-old"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "INFO: zsync not found, falling back to wget"
|
||||||
|
web_get "${ISO}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function start_vm_info() {
|
function start_vm_info() {
|
||||||
|
@ -634,7 +653,10 @@ function make_vm_config() {
|
||||||
|
|
||||||
IMAGE_FILE="${1}"
|
IMAGE_FILE="${1}"
|
||||||
ISO_FILE="${2}"
|
ISO_FILE="${2}"
|
||||||
if [ "${OS}" == "archlinux" ]; then
|
if [ "${OS}" == "android" ]; then
|
||||||
|
GUEST="linux"
|
||||||
|
IMAGE_TYPE="iso"
|
||||||
|
elif [ "${OS}" == "archlinux" ]; then
|
||||||
GUEST="linux"
|
GUEST="linux"
|
||||||
IMAGE_TYPE="iso"
|
IMAGE_TYPE="iso"
|
||||||
elif [ "${OS}" == "elementary" ]; then
|
elif [ "${OS}" == "elementary" ]; then
|
||||||
|
@ -1390,7 +1412,9 @@ if [ -n "${2}" ]; then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo -n "ERROR! You must specify a release: "
|
echo -n "ERROR! You must specify a release: "
|
||||||
if [ "${OS}" == "archlinux" ]; then
|
if [ "${OS}" == "android" ]; then
|
||||||
|
releases_android
|
||||||
|
elif [ "${OS}" == "archlinux" ]; then
|
||||||
releases_archlinux
|
releases_archlinux
|
||||||
elif [ "${OS}" == "elementary" ]; then
|
elif [ "${OS}" == "elementary" ]; then
|
||||||
releases_elementary
|
releases_elementary
|
||||||
|
|
Loading…
Reference in a new issue