fix version detection in OSX build script
authorRobin Gareus <robin@gareus.org>
Tue, 30 Apr 2013 15:45:22 +0000 (17:45 +0200)
committerRobin Gareus <robin@gareus.org>
Tue, 30 Apr 2013 15:45:22 +0000 (17:45 +0200)
tools/osx_packaging/osx_build

index d750674d36c29b37426b0db98e02f21fa88852c1..af582ff3bf63e1fb08c68c32859f12c83284993d 100755 (executable)
@@ -62,9 +62,13 @@ while [ $# -gt 0 ] ; do
     esac
 done
 
-#release_version=`grep -m 1 '[^A-Za-z_]OSX_VERSION = ' ../../wscript | cut -d' ' -f 3 | sed "s/'//g"`
-release_version=3.0
-revision=`grep -m 1 'revision =' ../../libs/ardour/revision.cc | cut -d' ' -f 8 | sed 's/[^0-9]//g'`
+if test -z "$PRODUCT_PKG_DIR" -o -z "$APPNAME"; then
+       echo "application or product-name was not specified"
+       exit 1
+fi
+
+release_version=`grep -m 1 '[^A-Za-z_]OSX_VERSION = ' ../../wscript | cut -d"'" -f2`
+revision=`grep -m 1 'revision =' ../../libs/ardour/revision.cc | cut -d'"' -f 2 | sed 's/^.*-//g'`
 echo "Version is $release_version / $revision"
 info_string="$release_version/$revision built on `hostname` by `whoami` on `date`"
 echo "Info string is $info_string"