From: Jakub Skoczen Date: Mon, 12 Jul 2010 11:30:51 +0000 (-0400) Subject: Query rpm for topdir location. X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=25a22cb63f6ca4969a4291eec68387cec9529980;p=git-tools-moved-to-github.git Query rpm for topdir location. Instead of assuming /usr/src/redhat as a used may redefined it --- diff --git a/id-rpm-build/upload-rpms.sh b/id-rpm-build/upload-rpms.sh index 6cbe525..b535e0d 100755 --- a/id-rpm-build/upload-rpms.sh +++ b/id-rpm-build/upload-rpms.sh @@ -1,4 +1,3 @@ -BUILD_DIR=${BUILD_DIR:=/usr/src/redhat/} PWD=`pwd` UPLOAD_PATH=${UPLOAD_PATH:=/home/ftp/pub} UPLOAD_HOST=${UPLOAD_HOST:=flurry} @@ -12,6 +11,8 @@ if test ! -x /bin/rpm; then echo "$0: /bin/rpm missing. Install rpm" exit 1 fi +topdir=`rpm --eval "%{_topdir}"` +BUILD_DIR=${BUILD_DIR:=${topdir}} pkg_names=`rpm -q --specfile ${specfile}` pkg_short=`rpm -q --specfile ${specfile} --queryformat "%{NAME};" | cut -d ";" -f1`