File: tarball

package info (click to toggle)
espeakup 1:0.80-16
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 632 kB
  • sloc: ansic: 2,885; sh: 208; makefile: 65
file content (22 lines) | stat: -rw-r--r-- 565 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# Makes a tarball release

VER=$(./version)
PREFIX=espeakup-${VER}
REL=${1:-v${VER}}

if [ "$REL" != "v${VER}" ]; 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 --delete ${PREFIX}/tarball
mkdir ${PREFIX}
git log ${REL} > ${PREFIX}/ChangeLog
tar rf ${TARFILE} ${PREFIX}
rm -rf ${PREFIX}
bzip2 ${TARFILE}
echo "Produced ${TARFILE}.bz2"