summaryrefslogtreecommitdiff
path: root/packaging/create-source-archive.sh
blob: a63842a9690ccb10bea5c9fbe27de98566cda932 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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