summaryrefslogtreecommitdiffstats
path: root/prepare-tarball.sh
diff options
context:
space:
mode:
authorPavel Raiskup <pavel@raiskup.cz>2013-01-20 13:10:10 +0100
committerPavel Raiskup <pavel@raiskup.cz>2013-01-20 13:11:58 +0100
commit1d48cf76bdb00db6caa75506c1bc32855de73b3d (patch)
treef72370392ace37dcbff498d13c581403de7a6a11 /prepare-tarball.sh
downloadpybugz-1d48cf76bdb00db6caa75506c1bc32855de73b3d.tar.gz
pybugz-1d48cf76bdb00db6caa75506c1bc32855de73b3d.tar.xz
pybugz-1d48cf76bdb00db6caa75506c1bc32855de73b3d.zip
Initial commit
Diffstat (limited to 'prepare-tarball.sh')
-rwxr-xr-xprepare-tarball.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/prepare-tarball.sh b/prepare-tarball.sh
new file mode 100755
index 0000000..a75c61a
--- /dev/null
+++ b/prepare-tarball.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# grep the spec file for version number
+VERSION=$( cat pybugz.spec | grep ^Version: | cut -d' ' -f 2- | tr -d ' ')
+
+BASE=pybugz-$VERSION
+TARBALL=$BASE.tar.gz
+DIR=$( mktemp -d )
+GIT=https://github.com/williamh/pybugz.git
+
+REVISION=`echo $VERSION | sed 's/.*git//'`
+
+echo == preparing tarball for pybugz-$VERSION ==
+
+pushd $DIR > /dev/null && \
+git clone $GIT pybugz && \
+cd pybugz && \
+git archive --prefix pybugz-$VERSION/ $REVISION | gzip > $TARBALL && \
+popd > /dev/null && \
+cp $DIR/pybugz/$TARBALL . && \
+echo == DONE == && \
+rm -rf $DIR