Re: [PATCHv2 6/7] web--browse: use (x-)www-browser if available
- From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
- Date
- Dec 3, 2010, 17:57 UTC
- Message-ID
- <AANLkTik=pGND-EYQ2HYTmevVd5S9pXZBNSpDsnafOF2V@mail.gmail.com>
- In-Reply-To
- <AANLkTimAdrqYezL5jf9OR_J5XdYW-KYhYy9n_VQAUSD8@mail.gmail.com>
On Fri, Dec 3, 2010 at 6:40 PM, Christian Couder <christian.couder@gmail.com> wrote:
Show 9 quoted lines
> Hi, > >> Custom commands may also be specified. >> >> +If no default browser is specified, and /usr/bin/x-www-browser >> +(under X) or /usr/bin/www-browser is present, they are used to determine >> +the browser to use. > > It looks like /usr/bin/gnome-www-browser is missing.
Good catch. I'll add it.
Show 11 quoted lines
>> + echo >&2 "$basename ($browser) is not a supported browser, skipping" > > Why not: > > echo >&2 "$basename (from $testexe) is not a supported browser, skipping" > > ? > > Otherwise we might get something like: > > "newbrowser (newbrowser) is not a supported browser, skipping"
I rephrased it to:
echo >&2 "$testexe (detected as $browser) is not a supported browser, skipping"
Show 9 quoted lines
>> @@ -133,7 +185,7 @@ if test -z "$browser" ; then >> fi >> done >> test -z "$browser" && die "No known browser available." >> -else >> +else if test -z "$browser_path"; then > > Now that you reset $browser above, I am not sure this test -z > "$browser_path" is useful...
I believe it is. If the *www-browser detection was successful, _that's_ what we want to launch, so we want to skip the init_browser_path in that else section, which we would hit if we didn't check for $browser_path. We also don't want to repeat the valid_tool check, since we know it's valid already.
-- Giuseppe "Oblomov" Bilotta