packaging: make update-pkginfo callable from any directory
authorMichael Adam <obnox@samba.org>
Tue, 10 Feb 2009 22:52:40 +0000 (23:52 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 10 Feb 2009 23:29:16 +0000 (00:29 +0100)
Michael

packaging/bin/update-pkginfo

index ed34db0bb3d043e61d73cdb705bbc7f489cf4fd7..7587f689d910ff148946204ef8a0d206a987a36b 100755 (executable)
@@ -15,6 +15,11 @@ if [ $# -ne 3 ]; then
     exit 1
 fi
 
+DIRNAME=$(dirname $0)
+TOPDIR=${DIRNAME}/../../
+PACKAGINGDIR=${TOPDIR}/packaging
+
+pushd ${PACKAGINGDIR} > /dev/null 2>&1
 for f in `find . -type f -name "*.tmpl"`; do
         f2=`echo $f | sed s/.tmpl//g`
         echo $f2
@@ -23,4 +28,4 @@ for f in `find . -type f -name "*.tmpl"`; do
                -e s/PREVISION/${REVISION}/g \
                -e s/PRPMREV/${RPMREVISION}/g < $f > $f2
 done
-
+popd > /dev/null 2>&1