Simplify --ssh command line usage
[gsh.git] / release.sh
blobcb7edaa22563904f420aec5bc1cb17afd9c39f33
1 #!/bin/bash
3 set -x
4 set -e # Exit on error
6 PACKAGE=$(basename "$PWD")
7 mkdir dist
8 TEMPDIR="$(mktemp -d)"
9 read VERSION < NEWS
10 echo "$PACKAGE-$VERSION: $TEMPDIR"
11 hg archive "$TEMPDIR/$PACKAGE-$VERSION"
12 DIR="$PWD"
13 cd "$TEMPDIR"
14 rm "$PACKAGE-$VERSION/release.sh"
15 rm "$PACKAGE-$VERSION"/.hg*
16 tar czf "$DIR/dist/$PACKAGE-$VERSION.tar.gz" "$PACKAGE-$VERSION"
17 tar cjf "$DIR/dist/$PACKAGE-$VERSION.tar.bz2" "$PACKAGE-$VERSION"
18 cd "$PACKAGE-$VERSION"
19 ./setup.py bdist_rpm
20 mv "dist/$PACKAGE-$VERSION-1."{noarch,src}.rpm "$DIR/dist"
21 rm -fr "$TEMPDIR"