[Portland] xdg-utils: common return values [CORRECT PATCH]

Bastian, Waldo waldo.bastian at intel.com
Sat Apr 29 18:31:47 PDT 2006


It's easier that way to point someone to webcvs and have them try out
one of the scripts. It also makes it easy to link to the html manpages
in webcvs.

This whole include business looks a bit like overengineering to me btw,
let's keep things simple. 

Waldo Bastian
Linux Client Architect - Client Linux Foundation Technology
Channel Platform Solutions Group
Intel Corporation - http://www.intel.com/go/linux
OSDL DTL Tech Board Chairman

>-----Original Message-----
>From: portland-bounces at lists.freedesktop.org [mailto:portland-
>bounces at lists.freedesktop.org] On Behalf Of Jeremy White
>Sent: Saturday, April 29, 2006 4:30 PM
>To: Kevin Krammer
>Cc: portland at lists.freedesktop.org
>Subject: Re: [Portland] xdg-utils: common return values [CORRECT PATCH]
>
>Hmm.  This has exposed some laziness on my part; I did not
>do a full 'make scripts' prior to building my patch, I
>was doing my testing only with xdg-menu.
>
>But it leads me to question the value of having generated
>files in CVS.  Why are we doing that?
>
>Jeremy
>
>> Index: scripts/xdg-copy
>> +# Include the xdg-includes script fragement, which provides
definitions
>> +#   for error codes and information we wish to share between the
xdg-
>util
>> +#   scripts and their callers
>> +source_xdg_includes()
>> +{
>> +    # Easy case - it's in the path
>> +    which xdg-includes >/dev/null 2>&1
>> +    if [ $? -eq 0 ] ; then
>> +        source xdg-includes
>> +        return 0
>> +    fi
>> +
>> +    # Rats.  It wasn't in the path.  Now we have to try to find
>> +    #   it in the same dir as $0
>> +    dir=`dirname "$0"`
>> +    if [ -f "$dir/xdg-includes" ] ; then
>> +        source "$dir/xdg-includes"
>> +        return 0
>> +    fi
>> +
>> +    return 1
>> +}
>> +
>_______________________________________________
>Portland mailing list
>Portland at lists.freedesktop.org
>http://lists.freedesktop.org/mailman/listinfo/portland



More information about the Portland mailing list