show_iso_url test_iso_url open_distro_homepage
This commit is contained in:
parent
58e69834cb
commit
75b97b4294
38
quickget
38
quickget
|
@ -25,15 +25,27 @@ function cleanup() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "${1}" == '-t' ]; then
|
if [ "${1}" == '--test-iso-url' ]; then
|
||||||
testmode="on"
|
test_iso_url="on"
|
||||||
if [ -n "$4" ]; then
|
if [ -n "$4" ]; then
|
||||||
set -- "$2" "$3" "$4"
|
set -- "$2" "$3" "$4"
|
||||||
elif [ -n "$3" ]; then
|
elif [ -n "$3" ]; then
|
||||||
set -- "$2" "$3"
|
set -- "$2" "$3"
|
||||||
else
|
else
|
||||||
|
set -- "$2"
|
||||||
|
fi
|
||||||
|
elif [ "${1}" == '--show-iso-url' ]; then
|
||||||
|
show_iso_url="on"
|
||||||
|
if [ -n "$4" ]; then
|
||||||
|
set -- "$2" "$3" "$4"
|
||||||
|
elif [ -n "$3" ]; then
|
||||||
|
set -- "$2" "$3"
|
||||||
|
else
|
||||||
|
set -- "$2"
|
||||||
|
fi
|
||||||
|
elif [ "${1}" == '--open-distro-homepage' ]; then
|
||||||
|
open_distro_homepage="on"
|
||||||
set -- "$2"
|
set -- "$2"
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function pretty_name() {
|
function pretty_name() {
|
||||||
|
@ -861,10 +873,14 @@ function web_get() {
|
||||||
fi
|
fi
|
||||||
echo #Necessary as aria2c in suppressed mode does not have new lines
|
echo #Necessary as aria2c in suppressed mode does not have new lines
|
||||||
# Test mode for ISO (yet wget only)
|
# Test mode for ISO (yet wget only)
|
||||||
elif [ "${testmode}" == 'on' ]; then
|
elif [ "${show_iso_url}" == 'on' ]; then
|
||||||
echo "${URL}"
|
echo "${URL}"
|
||||||
#wget --spider "${URL}"
|
exit 0
|
||||||
exit 1
|
elif [ "${test_iso_url}" == 'on' ]; then
|
||||||
|
wget --spider "${URL}"
|
||||||
|
exit 0
|
||||||
|
elif [ "${open_distro_homepage}" == 'on' ]; then
|
||||||
|
xdgopen "${distro_homepage}" && exit 0
|
||||||
else
|
else
|
||||||
if ! wget --quiet --continue --tries=3 --read-timeout=10 --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then
|
if ! wget --quiet --continue --tries=3 --read-timeout=10 --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then
|
||||||
echo "ERROR! Failed to download ${URL} with wget. Try running 'quickget' again."
|
echo "ERROR! Failed to download ${URL} with wget. Try running 'quickget' again."
|
||||||
|
|
Loading…
Reference in New Issue