Propagate command renaming
[polysh.git] / release.sh
blob0b4fd8aa5686db6682278791bfe5f912499e22b7
1 #!/bin/bash
3 set -x
4 set -e # Exit on error
6 PACKAGE=$(basename "$PWD")
7 mkdir dist
8 TEMPDIR="$(mktemp -d)"
9 VERSION=$(python -c 'from gsh.version import VERSION; print VERSION')
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"