fix up detection of version by define_versions.sh
[ardour.git] / tools / define_versions.sh
1
2 # this is sourced by build and package, and executed from within build/{osx,linux}_packaging
3 #
4
5 major_version=`grep -m 1 '^MAJOR = ' ../../wscript | awk '{print $3}' | sed "s/'//g"`
6 minor_version=`grep -m 1 '^MINOR = ' ../../wscript | awk '{print $3}' | sed "s/'//g"`
7 release_version=${major_version}.${minor_version}
8 r=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed -e 1d -e "s/[0-9][0-9]*\.[0-9][0-9]*-//"`
9 if echo $r | grep -q -e - ; then
10     revcount=`echo $r | cut -d- -f1`
11 fi
12 commit=`echo $r | cut -d- -f2`
13 version=${release_version}${revcount:+.$revcount}
14
15 #
16 # Figure out the Build Type
17 #
18 # Note that the name of the cache file may vary from to time
19 #
20
21 if grep -q "DEBUG = True" ../../build/c4che/_cache.py; then
22         DEBUG="T"
23 else
24         DEBUG="F"
25 fi