3 # Copyright (C) Michael Adam 2009
5 # Create CTDB source tarball of the current git branch HEAD.
6 # The version is extracted from the spec file...
7 # The first extra argument will be added as an additional version.
12 SPECFILE=${RPMDIR}/ctdb.spec
16 VERSION=$(grep ^Version ${SPECFILE} | sed -e 's/^Version:\ \+//')
18 if [ "x${EXTRA_SUFFIX}" != "x" ]; then
19 VERSION="${VERSION}-${EXTRA_SUFFIX}"
22 if echo | gzip -c --rsyncable - > /dev/null 2>&1 ; then
23 GZIP="gzip -9 --rsyncable"
29 echo -n "Creating ctdb-${VERSION}.tar.gz ... "
30 git archive --prefix=ctdb-${VERSION}/ HEAD | ${GZIP} \
31 > ${TOPDIR}/ctdb-${VERSION}.tar.gz
37 if [ $RC -ne 0 ]; then
38 echo "Creation of tarball failed."