~ubuntu-branches/ubuntu/precise/speakup/precise

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
# Makes a tarball release

SPKVER=$(./version)
PREFIX=speakup-${SPKVER}
REL=${1:-v${SPKVER}}

if [ "$REL" != "v${SPKVER}" ]; then
	TIMESTAMP=$(git show $REL --pretty=format:%ai | head -1)
	PATCHLEVEL=$(date --utc -d "$TIMESTAMP" +_p%Y%m%d%H%M)
fi

TARFILE=${PREFIX}${PATCHLEVEL}.tar

git archive --format=tar --prefix=${PREFIX}/ $REL > ${TARFILE}
tar f ${TARFILE} --delete ${PREFIX}/.gitignore ${PREFIX}/makedist
bzip2 ${TARFILE}
echo "Produced ${TARFILE}.bz2"