From 15bd5fb8e77053015512752a5fc95af0dc2db3b2 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 26 Nov 2009 08:34:44 +0100 Subject: [PATCH] configure:maketarball.sh: call autogen.sh and include configure in the tarball Michael (This used to be ctdb commit bc8aee079e09164e06533a1474f5e9d899795933) --- ctdb/packaging/maketarball.sh | 47 ++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/ctdb/packaging/maketarball.sh b/ctdb/packaging/maketarball.sh index 39f81d2dd3e..823fe2ac0c2 100755 --- a/ctdb/packaging/maketarball.sh +++ b/ctdb/packaging/maketarball.sh @@ -54,18 +54,53 @@ else GZIP="gzip -9" fi +TAR_PREFIX="ctdb-${VERSION}" +TAR_BASE="ctdb-${VERSION}" + +TAR_BALL=${TAR_BASE}.tar +TAR_GZ_BALL=${TAR_BALL}.gz + pushd ${TOPDIR} -echo -n "Creating ctdb-${VERSION}.tar.gz ... " -git archive --prefix=ctdb-${VERSION}/ HEAD | ${GZIP} \ - > ${TOPDIR}/ctdb-${VERSION}.tar.gz +echo "Creating ${TAR_BASE}.tar.gz ... " +git archive --prefix=${TAR_PREFIX}/ HEAD | ( cd /tmp ; tar xf - ) RC=$? popd - -echo "Done." - if [ $RC -ne 0 ]; then + echo "Error calling git archive." + exit 1 +fi + +pushd /tmp/${TAR_PREFIX} +./autogen.sh +RC=$? +popd +if [ $RC -ne 0 ]; then + echo "Error calling autogen.sh." + exit 1 +fi + +pushd /tmp +tar cf ${TAR_BALL} ${TAR_PREFIX} +RC=$? +if [ $RC -ne 0 ]; then + popd echo "Creation of tarball failed." exit 1 fi +${GZIP} ${TAR_BALL} +RC=$? +if [ $RC -ne 0 ]; then + popd + echo "Zipping tarball failed." + exit 1 +fi + +rm -rf ${TAR_PREFIX} + +popd + +mv /tmp/${TAR_GZ_BALL} . + +echo "Done." exit 0