[Portland] xdg-utils: common return values [CORRECT PATCH]
Jeremy White
jwhite at codeweavers.com
Sun Apr 30 02:29:46 EEST 2006
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
> +}
> +
More information about the Portland
mailing list