[PATCH util-modular v2] release.sh: unset GPGKEY if already existing

Peter Hutterer peter.hutterer at who-t.net
Thu Apr 20 00:17:41 UTC 2017


On Wed, Apr 19, 2017 at 03:59:33PM +0300, Andres Gomez wrote:
> GPGKEY may already exist in the environment. In that case, just
> unset it.
> 
> v2: unsetting is safer than redefining to quietly use a potentially
>     wrong key stored in the variable (Peter).
> 
> Signed-off-by: Andres Gomez <agomez at igalia.com>
> Cc: Emil Velikov <emil.velikov at collabora.com>
> Cc: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>  release.sh | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/release.sh b/release.sh
> index f976f94..b8a0aaf 100755
> --- a/release.sh
> +++ b/release.sh
> @@ -808,6 +808,11 @@ if [ "x$GPG" = "x" ] ; then
>      fi
>  fi
>  
> +# Unset GPGKEY if needed
> +if [ ! -z ${GPGKEY+x} ] ; then
> +    unset GPGKEY
> +fi

wouldn't that fail if GPGKEY is set to the empty string? Plus, I had to look
up what ${foo+x} actually does :) Should we just stick to the simple well
known:

if [ "x$GPGKEY" != "x" ] ; then
    unset GPGKEY
fi

Cheers,
   Peter

> +
>  # Set the default make tarball creation command
>  MAKE_DIST_CMD=distcheck
>  
> -- 
> 2.11.0
> 


More information about the xorg-devel mailing list