qg: show-distro-homepage needed for distro tip

This commit is contained in:
zenobit 2023-12-14 18:13:48 +01:00 committed by zenobit
parent 3106911166
commit c734916939
1 changed files with 12 additions and 3 deletions

View File

@ -36,7 +36,7 @@ if [ "${1}" == '--test-iso-url' ] || [ "${1}" == '-t' ]; then
else
set -- "$2"
fi
elif [ "${1}" == '--show-iso-url' ] || [ "${1}" == '-s' ]; then
elif [ "${1}" == '--show-iso-url' ] || [ "${1}" == '-u' ]; then
show_iso_url="on"
if [ -n "$4" ]; then
set -- "$2" "$3" "$4"
@ -48,6 +48,9 @@ elif [ "${1}" == '--show-iso-url' ] || [ "${1}" == '-s' ]; then
elif [ "${1}" == '--open-distro-homepage' ] || [ "${1}" == '-o' ]; then
open_distro_homepage="on"
set -- "$2"
elif [ "${1}" == '--show-distro-homepage' ] || [ "${1}" == '-s' ]; then
show_distro_homepage="on"
set -- "$2"
fi
function pretty_name() {
@ -3304,11 +3307,13 @@ else
echo "
You can also use this arguments:
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-iso-url / -t {distro} {release} [edition]
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
fi
@ -3396,6 +3401,10 @@ else
HOMEPAGE=$(os_homepages ${OS})
open_url "${HOMEPAGE}" && exit 0
fi
if [ "${show_distro_homepage}" == 'on' ]; then
HOMEPAGE=$(os_homepages ${OS})
echo "${HOMEPAGE}" && exit 0
fi
echo "ERROR! You must specify a release."
case ${OS} in
*ubuntu-server*)