On Sun, 08 Jun 2014 21:48:52 -0400, Gaetan Nadon <[email protected]> wrote:
> On 14-06-07 03:57 PM, Stephen Kitt wrote:
> >  
> > #------------------------------------------------------------------------------
> > +#                       Function: sign_or_fail
> > +#------------------------------------------------------------------------------
> > +#
> > +# Sign the given file, if any
> > +# Output the name of the signature generated to stdout (all other output
> > to +# stderr)
> > +# Return 0 on success, 1 on fail
> > +#
> > +sign_or_fail() {
> > +    if [ -n "$1" ]; then
> > +   sig=$1.sig
> > +   rm -f $sig
> > +   $GPG -b $1 1>&2
> > +   if [ $? -ne 0 ]; then
> > +       echo "Error: failed to sign $1." >&2
> > +       return 1
> > +   fi
> > +   echo $sig
> This echo statement does not appear for me. Perhaps because the function
> is called from $(). I do get the gpg message:
> 
>     You need a passphrase to unlock the secret key for
>     user: "Gaetan Nadon <[email protected]>"
>     1024-bit DSA key, ID FB9EC9FC, created 2008-12-16
> 
> Not a big deal,

Thanks for the review!

The output of the echo statement isn't supposed to appear, it's used to
effectively provide the result of the function which then ends up in a
variable for later use by the caller.

Regards,

Stephen

Attachment: signature.asc
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to