mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
add open_url function
This commit is contained in:
parent
26774bde57
commit
62ddfc3a2c
1 changed files with 6 additions and 2 deletions
8
quickget
8
quickget
|
@ -2532,6 +2532,11 @@ function get_windows() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open_url() {
|
||||||
|
local URL="$1";
|
||||||
|
xdg-open $URL || sensible-browser $URL || x-www-browser $URL || gnome-open $URL;
|
||||||
|
}
|
||||||
|
|
||||||
create_vm() {
|
create_vm() {
|
||||||
# shellcheck disable=SC2206
|
# shellcheck disable=SC2206
|
||||||
local URL_HASH=(${1// / })
|
local URL_HASH=(${1// / })
|
||||||
|
@ -2682,8 +2687,7 @@ if [ -n "${2}" ]; then
|
||||||
else
|
else
|
||||||
if [ "${open_distro_homepage}" == 'on' ]; then
|
if [ "${open_distro_homepage}" == 'on' ]; then
|
||||||
homepage=$(os_homepages | sed 's/\s\+/\n/g' | grep ${OS} | cut -d'/' -f2-9)
|
homepage=$(os_homepages | sed 's/\s\+/\n/g' | grep ${OS} | cut -d'/' -f2-9)
|
||||||
echo "${homepage}"
|
open_url "${homepage}" && exit 0
|
||||||
xdg-open "${homepage}" && exit 0
|
|
||||||
fi
|
fi
|
||||||
echo "ERROR! You must specify a release."
|
echo "ERROR! You must specify a release."
|
||||||
case ${OS} in
|
case ${OS} in
|
||||||
|
|
Loading…
Reference in a new issue