summaryrefslogtreecommitdiff
path: root/packaging/create-source-archive.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/create-source-archive.sh')
-rwxr-xr-xpackaging/create-source-archive.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/packaging/create-source-archive.sh b/packaging/create-source-archive.sh
new file mode 100755
index 0000000..a63842a
--- /dev/null
+++ b/packaging/create-source-archive.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+VERSION=`cat debian/control|grep Version| cut -d' ' -f2| cut -d'-' -f1`
+echo Version $VERSION
+BRANCH=`hg log -r v$VERSION|grep branch|head -n1| cut -d' ' -f7`
+echo Branch $BRANCH
+SRC_DIR=$PWD
+DST_DIR=freshmemory-$VERSION
+
+cd ..
+hg clone $SRC_DIR $DST_DIR > /dev/null
+
+cd $DST_DIR
+hg up $BRANCH > /dev/null
+rm -r .hg*
+cd ..
+
+tar cvjf $DST_DIR.tar.bz2 $DST_DIR > /dev/null
+