packaging/RHEL-CTDB: try harder to set $RPMVER
[gd/samba-autobuild/.git] / packaging / RHEL-CTDB / makerpms.sh
index d23d14ed8abe3bdd27511a0bb7edfc7141335552..163b4aed306c39983827f0fb05a7cad7d2d9698f 100755 (executable)
@@ -27,6 +27,9 @@ TOPDIR=${DIRNAME}/../..
 
 SPECFILE="samba.spec"
 RPMVER=`rpm --version | awk '{print $3}'`
+test -z "$RPMVER" && {
+       RPMVER=`rpm --version | awk '{print $2}'`
+}
 RPM="rpmbuild"
 
 ##