[PATCH modular 4/8] build.sh: use more descriptive variable names for check_writable_dir

Peter Hutterer peter.hutterer at who-t.net
Tue Jan 4 14:44:17 PST 2011


On Tue, 04 Jan 2011 15:44:38 -0500, Gaetan Nadon <memsize at videotron.ca> wrote:
> Reported-by: Peter Hutterer <peter.hutterer at who-t.net>
> 
> Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
> ---
>  build.sh |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/build.sh b/build.sh
> index 07c7de5..bee76a9 100755
> --- a/build.sh
> +++ b/build.sh
> @@ -1036,9 +1036,11 @@ check_full_path () {
>  # returns:
>  #   returns nothing or exit on error with message
>  check_writable_dir () {
> +    dir=$1
> +    varname=$2
>      if [ X"$SUDO" = X ]; then
> -	if [ ! -d "$1" ] || [ ! -w "$1" ]; then
> -	    echo "The path \"$1\" supplied by \"$2\" must be a writable directory"
> +	if [ ! -d "$dir" ] || [ ! -w "$dir" ]; then
> +	    echo "The path \"$dir\" supplied by \"$varname\" must be a writable directory"
>  	    echo ""
>  	    usage
>  	    exit 1
> -- 
> 1.6.0.4

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

thanks!



More information about the xorg-devel mailing list