[PATCH:modular] build.sh: fix test error message when modules file not supplied

Gaetan Nadon memsize at videotron.ca
Thu Feb 9 04:32:06 PST 2012


On 12-02-09 12:46 AM, Alan Coopersmith wrote:
> Seems to be harmless, just noisy message:
> git/util/modular/build.sh[1323]: [: argument expected
>
> sh -x shows it was coming from expanding:
> if [ X"$BUILT_MODULES_FILE" != X -a -r $BUILT_MODULES_FILE ]
>
> to:
> + [ X '!=' X -a -r ]
>
> Adding quotes ensures the shell sees an empty argument instead of none.
>
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
>  build.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/build.sh b/build.sh
> index a3eaf77..2093644 100755
> --- a/build.sh
> +++ b/build.sh
> @@ -1320,7 +1320,7 @@ fi
>  # if   there is a BUILT_MODULES_FILE
>  # then start off by checking for and trying to build any modules which failed
>  #      and aren't the last line
> -if [ X"$BUILT_MODULES_FILE" != X -a -r $BUILT_MODULES_FILE ]; then
> +if [ X"$BUILT_MODULES_FILE" != X -a -r "$BUILT_MODULES_FILE" ]; then
>      built_lines=`cat $BUILT_MODULES_FILE | wc -l | sed 's:^ *::'`
>      built_lines_m1=`expr $built_lines - 1`
>      orig_BUILT_MODULES_FILE=$BUILT_MODULES_FILE

Reviewed-by: Gaetan Nadon <memsize at videotron.ca>


More information about the xorg-devel mailing list