packaging: enable calling RHEL-CTDB/makerpms.sh from other directories
authorMichael Adam <obnox@samba.org>
Thu, 15 May 2008 23:26:47 +0000 (01:26 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 16 May 2008 01:15:23 +0000 (03:15 +0200)
Michael
(cherry picked from commit 05168aaa8dba85ecc1b74afacdd4d5ddc5825cfa)
(This used to be commit 7de8666c722be5dce8520f34a0823eb8767ab5d5)

packaging/RHEL-CTDB/makerpms.sh

index 0ee00b76883d4ff9a353cce83946c785bde3cbda..a9d49bc2a4ad4238c9de97d9e6990ba75b152a09 100755 (executable)
@@ -41,7 +41,9 @@ case $RPMVER in
        ;;
 esac
 
-pushd ../..
+DIRNAME=$(dirname $0)
+
+pushd ${DIRNAME}/../..
 echo -n "Creating samba-${VERSION}.tar.bz2 ... "
 git archive --prefix=samba-${VERSION}/ HEAD | bzip2 > ${SRCDIR}/samba-${VERSION}.tar.bz2
 RC=$?
@@ -60,11 +62,15 @@ if [ "x${DOCS_TARBALL}" != "x" ] && [ -f ${DOCS_TARBALL} ]; then
     cp ${DOCS_TARBALL} ${SRCDIR}/${DOCS}
 fi
 
+pushd ${DIRNAME}
+
 chmod 755 setup/filter-requires-samba.sh
 tar --exclude=.svn -jcvf - setup > ${SRCDIR}/setup.tar.bz2
 
 cp -p ${SPECFILE} ${SPECDIR}
 
+popd
+
 ##
 ## Build
 ##