[PATCH build 03/10] Print error message with location.

Adrian Bunk bunk at stusta.de
Sat Sep 18 14:26:04 PDT 2010


On Sat, Sep 18, 2010 at 04:11:21PM -0400, Trevor Woerner wrote:
>...
> +    if [ "${FUNCNAME[1]}" = "failed" ]; then
> +	_linenum=1
> +	_funcnum=2
> +    fi
> +
> +    echo "[${FUNCNAME[$_funcnum]}():${BASH_LINENO[$_linenum]}] $1" > /dev/stderr
>...

FUNCNAME (and arrays) are not supported by all shells.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



More information about the xorg-devel mailing list