quickget: show-distro-homepage needed for distro tip

This commit is contained in:
zenobit 2023-12-14 18:13:48 +01:00
parent 386c5d51e1
commit cdd5ffea97
1 changed files with 12 additions and 3 deletions

View File

@ -36,7 +36,7 @@ if [ "${1}" == '--test-iso-url' ] || [ "${1}" == '-t' ]; then
else else
set -- "$2" set -- "$2"
fi fi
elif [ "${1}" == '--show-iso-url' ] || [ "${1}" == '-s' ]; then elif [ "${1}" == '--show-iso-url' ] || [ "${1}" == '-u' ]; then
show_iso_url="on" show_iso_url="on"
if [ -n "$4" ]; then if [ -n "$4" ]; then
set -- "$2" "$3" "$4" set -- "$2" "$3" "$4"
@ -48,6 +48,9 @@ elif [ "${1}" == '--show-iso-url' ] || [ "${1}" == '-s' ]; then
elif [ "${1}" == '--open-distro-homepage' ] || [ "${1}" == '-o' ]; then elif [ "${1}" == '--open-distro-homepage' ] || [ "${1}" == '-o' ]; then
open_distro_homepage="on" open_distro_homepage="on"
set -- "$2" set -- "$2"
elif [ "${1}" == '--show-distro-homepage' ] || [ "${1}" == '-s' ]; then
show_distro_homepage="on"
set -- "$2"
fi fi
function pretty_name() { function pretty_name() {
@ -2750,11 +2753,13 @@ else
echo " echo "
You can also use this arguments: You can also use this arguments:
Only show ISO download URL Only show ISO download URL
--show-iso-url / -s {distro} {release} [edition] --show-iso-url / -u {distro} {release} [edition]
Test if ISO is available Test if ISO is available
--test-iso-url / -t {distro} {release} [edition] --test-iso-url / -t {distro} {release} [edition]
Open distro homepage Open distro homepage
--open-distro-homepage / -o {distro}" --open-distro-homepage / -o {distro}
Only show distro homepage link
--show-distro-homepage / -s {distro}"
exit 1 exit 1
fi fi
@ -2835,6 +2840,10 @@ else
HOMEPAGE=$(os_homepages ${OS}) HOMEPAGE=$(os_homepages ${OS})
open_url "${HOMEPAGE}" && exit 0 open_url "${HOMEPAGE}" && exit 0
fi fi
if [ "${show_distro_homepage}" == 'on' ]; then
HOMEPAGE=$(os_homepages ${OS})
echo "${HOMEPAGE}" && exit 0
fi
echo "ERROR! You must specify a release." echo "ERROR! You must specify a release."
case ${OS} in case ${OS} in
*ubuntu-server*) *ubuntu-server*)