fix definition of release version info in the case where git describe --tags returns...
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 8 Apr 2013 16:32:14 +0000 (12:32 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 8 Apr 2013 16:32:14 +0000 (12:32 -0400)
tools/linux_packaging/define_versions.sh

index 611df8017e7305eaef3f22bc7ed35364d656c997..188ca7167fe4cda0494af0b06edf94733a6f3f62 100644 (file)
@@ -4,9 +4,11 @@
 
 release_version=`grep -m 1 '[^A-Za-z_]LINUX_VERSION = ' ../../wscript | awk '{print $3}' | sed "s/'//g"`
 r=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed -e 1d -e "s/$release_version-//"`
-revcount=`echo $r | cut -d- -f1`
+if echo $r | grep -q -e - ; then
+    revcount=`echo $r | cut -d- -f1`
+fi
 commit=`echo $r | cut -d- -f2`
-version=${release_version}.${revcount}
+version=${release_version}${revcount:+:.revcount}
 
 #
 # Figure out the Build Type