##// END OF EJS Templates
build: initial version detection by make deb/rpm was missing quoting
muxator -
r34624:baa52288 default
parent child Browse files
Show More
@@ -1,35 +1,35 b''
1 # Extract version number into 4 parts, some of which may be empty:
1 # Extract version number into 4 parts, some of which may be empty:
2 #
2 #
3 # version: the numeric part of the most recent tag. Will always look like 1.3.
3 # version: the numeric part of the most recent tag. Will always look like 1.3.
4 #
4 #
5 # type: if an rc build, "rc", otherwise empty
5 # type: if an rc build, "rc", otherwise empty
6 #
6 #
7 # distance: the distance from the nearest tag, or empty if built from a tag
7 # distance: the distance from the nearest tag, or empty if built from a tag
8 #
8 #
9 # node: the node|short hg was built from, or empty if built from a tag
9 # node: the node|short hg was built from, or empty if built from a tag
10 gethgversion() {
10 gethgversion() {
11 make cleanbutpackages
11 make cleanbutpackages
12 make local || make local PURE=--pure
12 make local || make local PURE=--pure
13 HG="$PWD/hg"
13 HG="$PWD/hg"
14
14
15 $HG version > /dev/null || { echo 'abort: hg version failed!'; exit 1 ; }
15 "$HG" version > /dev/null || { echo 'abort: hg version failed!'; exit 1 ; }
16
16
17 hgversion=`LANGUAGE=C $HG version | sed -ne 's/.*(version \(.*\))$/\1/p'`
17 hgversion=`LANGUAGE=C "$HG" version | sed -ne 's/.*(version \(.*\))$/\1/p'`
18
18
19 if echo $hgversion | grep + > /dev/null 2>&1 ; then
19 if echo $hgversion | grep + > /dev/null 2>&1 ; then
20 tmp=`echo $hgversion | cut -d+ -f 2`
20 tmp=`echo $hgversion | cut -d+ -f 2`
21 hgversion=`echo $hgversion | cut -d+ -f 1`
21 hgversion=`echo $hgversion | cut -d+ -f 1`
22 distance=`echo $tmp | cut -d- -f 1`
22 distance=`echo $tmp | cut -d- -f 1`
23 node=`echo $tmp | cut -d- -f 2`
23 node=`echo $tmp | cut -d- -f 2`
24 else
24 else
25 distance=''
25 distance=''
26 node=''
26 node=''
27 fi
27 fi
28 if echo $hgversion | grep -- '-' > /dev/null 2>&1; then
28 if echo $hgversion | grep -- '-' > /dev/null 2>&1; then
29 version=`echo $hgversion | cut -d- -f1`
29 version=`echo $hgversion | cut -d- -f1`
30 type=`echo $hgversion | cut -d- -f2`
30 type=`echo $hgversion | cut -d- -f2`
31 else
31 else
32 version=$hgversion
32 version=$hgversion
33 type=''
33 type=''
34 fi
34 fi
35 }
35 }
General Comments 0
You need to be logged in to leave comments. Login now