1.1 --- a/docs/tools/sign_releases.sh Fri Apr 22 23:26:51 2016 +0200
1.2 +++ b/docs/tools/sign_releases.sh Fri Apr 22 23:38:31 2016 +0200
1.3 @@ -1,17 +1,24 @@
1.4 #!/bin/sh
1.5
1.6 -DIRNAME=`dirname $0`
1.7 -PROGNAME=`basename $0`
1.8 -OUTDIR=$1
1.9 -FORCE=$2
1.10 +DIRNAME=`dirname "$0"`
1.11 +PROGNAME=`basename "$0"`
1.12
1.13 -if [ ! "$OUTDIR" ]; then
1.14 +if [ ! "$1" ] || [ "$1" = '--help' ] ; then
1.15 cat 1>&2 <<EOF
1.16 -Usage: $PROGNAME <archive directory>
1.17 +Usage: $PROGNAME <archive directory> [ -f ]
1.18 +
1.19 +Sign archives in the given archive directory, invoking GPG to produce a
1.20 +detached signature. If a signature already exists for an archive, it is not
1.21 +regenerated unless the -f (force) option is given.
1.22 +
1.23 +All newly-created signature filenames are emitted on standard output.
1.24 EOF
1.25 exit 1
1.26 fi
1.27
1.28 +OUTDIR=$1
1.29 +FORCE=$2
1.30 +
1.31 if [ "$FORCE" != '-f' ]; then
1.32 FORCE=
1.33 fi
1.34 @@ -27,6 +34,6 @@
1.35 OUTFILE="$FILENAME.asc"
1.36 if [ ! -e "$OUTFILE" ] || [ "$FORCE" ]; then
1.37 gpg --sign -a -b "$FILENAME"
1.38 + echo "$OUTFILE"
1.39 fi
1.40 - echo "$OUTFILE"
1.41 done