[PATCH] autogen.sh: use quoted string variables

Peter Hutterer peter.hutterer at who-t.net
Mon Mar 9 22:34:50 PDT 2015


On Mon, Mar 09, 2015 at 12:00:52PM +0000, Emil Velikov wrote:
> Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
> fall-outs, when they contain space.
> 
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

I guess that should be pushed out to all repos.

Cheers,
   Peter

> ---
>  autogen.sh | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/autogen.sh b/autogen.sh
> index dd0731a..aee4beb 100755
> --- a/autogen.sh
> +++ b/autogen.sh
> @@ -1,14 +1,14 @@
>  #! /bin/sh
>  
> -srcdir=`dirname $0`
> +srcdir=`dirname "$0"`
>  test -z "$srcdir" && srcdir=.
>  
>  ORIGDIR=`pwd`
> -cd $srcdir
> +cd "$srcdir"
>  
>  autoreconf --force -v --install || exit 1
> -cd $ORIGDIR || exit $?
> +cd "$ORIGDIR" || exit $?
>  
>  if test -z "$NOCONFIGURE"; then
> -    exec $srcdir/configure "$@"
> +    exec "$srcdir"/configure "$@"
>  fi
> -- 
> 2.3.1
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 


More information about the xorg-devel mailing list