1.1 --- a/docs/tools/make_releases.sh Fri Apr 22 23:26:51 2016 +0200
1.2 +++ b/docs/tools/make_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 <output directory> [ -f ]
1.17 +
1.18 +Make release archives from tags starting with "rel-" in the repository,
1.19 +storing the archives in the output directory. If an archive already exists for
1.20 +a release, it is not regenerated unless the -f (force) option is given.
1.21 +
1.22 +All newly-created archive filenames are emitted on standard output.
1.23 EOF
1.24 exit 1
1.25 fi
1.26
1.27 +OUTDIR=$1
1.28 +FORCE=$2
1.29 +
1.30 if [ "$FORCE" != '-f' ]; then
1.31 FORCE=
1.32 fi
1.33 @@ -25,6 +32,6 @@
1.34 OUTFILE="$OUTDIR/imip-agent-$NUM.tar.bz2"
1.35 if [ ! -e "$OUTFILE" ] || [ "$FORCE" ]; then
1.36 hg archive -t tbz2 -r "$TAG" "$OUTFILE"
1.37 + echo "$OUTFILE"
1.38 fi
1.39 - echo "$OUTFILE"
1.40 done