Codebase list debian-goodies / c80c4d4
Add Recommends on sensible-utils for dhomepage Check for installed browsers before using them. Only check for sensible-utils, $BROWSER and the two browser alternatives. Use "echo" if none of them is found. Bump dhomepage version to 0.2. Axel Beckert 6 years ago
4 changed file(s) with 21 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
00 debian-goodies (0.76) UNRELEASED; urgency=medium
11
22 * Conflict with bikeshed (ubuntu-only package). (LP: #1728000)
3 * Add Recommends on sensible-utils for dhomepage.
4 + Check for installed browsers before using them.
35
46 -- Axel Beckert <abe@debian.org> Fri, 27 Oct 2017 12:05:18 +0200
57
1616 python3,
1717 whiptail | dialog,
1818 ${misc:Depends}
19 Recommends: lsof
19 Recommends: lsof,
20 sensible-utils
2021 Suggests: lsb-release,
2122 popularity-contest,
2223 xdg-utils,
1616 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1717 #
1818
19 VERSION="0.1"
19 VERSION="0.2"
2020
2121 version()
2222 {
6464 exit 1
6565 fi
6666
67 # Check for browsers
68 if [ -x "`which sensible-browser`" ]; then
69 DH_BROWSER=sensible-browser
70 elif [ -n "$BROWSER" -a -x "$(which "$BROWSER")" ]; then
71 DH_BROWSER="$BROWSER"
72 elif [ -n "$DISPLAY" -a -x "`which x-www-browser`" ]; then
73 DH_BROWSER=x-www-browser
74 elif [ -x "`which www-browser`" ]; then
75 DH_BROWSER=www-browser
76 else
77 echo "$0: Warning: No browser found. Just printing the homepage URL." 1>&2
78 DH_BROWSER=echo
79 fi
80
6781 for URL in $HOMEPAGE; do
68 sensible-browser "$URL"
82 "$DH_BROWSER" "$URL"
6983 done
2525
2626 .SH DESCRIPTION
2727 Shows the homepage of a Debian package using a sensible browser.
28 Outputs the URL if no browser is found.
2829
2930 .SH OPTIONS
3031