webbuild-sudo: fix getting specfile version

This commit is contained in:
Silvan Calarco 2012-09-06 18:56:32 +02:00
parent dcff130bdf
commit 71fec6c77a

View File

@ -44,8 +44,7 @@ if [ -r "$SPECFILE" ]; then
# rm -f ${_tmpfile} ${_errtmpfile}
# exit 254
# }
# SPECVERSION=`grep ^Version: ${_tmpfile} | sed "s|Version:[[:space:]]*||"`
SPECVERSION=`grep -c1 ^Version: ${SPECFILE} | sed "s|Version:[[:space:]]*||"`
SPECVERSION=`grep -m1 "^Version:" ${SPECFILE} | sed "s|Version:[[:space:]]*||"`
BUILDROOT=$PACKAGE-root
#`grep ^BuildRoot: ${_tmpfile} | sed "s|BuildRoot:[[:space:]]*||"`
# SPECSETUP=`grep %setup ${_tmpfile} | sed "s|.*-n ||"`