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"