Re: [PATCH 5/6] web--browse: use (x-)www-browser if available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 29, 2010 at 5:18 PM, Christian Couder
<christian.couder@xxxxxxxxx> wrote:
> Hi,
>
> On Mon, Nov 29, 2010 at 3:47 PM, Giuseppe Bilotta
> <giuseppe.bilotta@xxxxxxxxx> wrote:
>>
>> +# Debian and derivatives use x-www-browser or www-browser to set
>> +# the default browser for the system
>> +if test -z "$browser" ; then
>> +       wwwbrowser="/usr/bin/www-browser"
>> +       if test -n "$DISPLAY"; then
>> +               wwwbrowser="/usr/bin/x-www-browser $wwwbrowser"
>> +       fi
>> +       for i in $wwwbrowser; do
>> +               if test -x $i ; then
>> +                       verstring="$($i --version 2> /dev/null | head -n 1)"
>> +                       browser="$(echo "$verstring" | cut -f1 -d' ' | tr A-Z a-z)"
>
> Stupid questions:
>
> Did you check that all the browser we support accept the --version option?
> What if we add support for a new one that doesn't ?
> Shouldn't we add something like :
>
> test -z "$browser" && browser="$(echo $i | cut -f1 -d' ' | tr A-Z a-z)"

Sorry I mean:

 test -z "$browser" && browser="$(readlink $i)"

> And are you sure that when they support --version, the first word of
> the output is
> better than "$(echo $i | cut -f1 -d' ' | tr A-Z a-z)"?

and: "$(readlink $i)"

Thanks,
Christian.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]