diff --git a/.ci/make-tar.sh b/.ci/make-tar.sh index 11778f7b6..370968545 100755 --- a/.ci/make-tar.sh +++ b/.ci/make-tar.sh @@ -18,23 +18,34 @@ then cat <&2 usage: $0 [rev] [outfile.tar.gz] [prefix/] - "" may be any git revision spec. (tag, branch, or commit id). + may be any git revision spec. (tag, branch, or commit id). Output file may be .tar.gz, .tar.bz2, or any extension supported by "tar -a". - If output file name is omitted, then ".tar.gz" is the default. - If prefix is omitted, then the default is "/". + If output file name is omitted, "base-.tar.gz" will be used. + If is omitted, the default prefix is "base-/". EOF exit 1 fi -[ "$FINALTAR" ] || FINALTAR="$TOPREV.tar.gz" -[ "$PREFIX" ] || PREFIX="$TOPREV/" +[ "$FINALTAR" ] || FINALTAR="base-$TOPREV.tar.gz" +[ "$PREFIX" ] || PREFIX="base-$TOPREV/" case "$PREFIX" in */) ;; *) die "Prefix must end with '/'";; esac +# Check for both and R +if ! [ `git tag -l $TOPREV` ] +then + if [ `git tag -l R$TOPREV` ] + then + TOPREV="R$TOPREV" + else + die "No tags exist '$TOPREV' or 'R$TOPREV'" + fi +fi + # temporary directory w/ automatic cleanup TDIR=`mktemp -d` trap 'rm -rf "$TDIR"' EXIT INT QUIT TERM