annotate contrib/packagelib.sh @ 25874:3e84f40232c7 stable

repair: fix typo in warning message
author Wagner Bruna <wbruna@yahoo.com>
date Sun, 26 Jul 2015 09:28:52 -0300
parents 56c64c91b429
children 6474b64045fb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24972
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
1 gethgversion() {
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
2 make clean
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
3 make local || make local PURE=--pure
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
4 HG="$PWD/hg"
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
5
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
6 $HG version > /dev/null || { echo 'abort: hg version failed!'; exit 1 ; }
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
7
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
8 hgversion=`$HG version | sed -ne 's/.*(version \(.*\))$/\1/p'`
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
9
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
10 if echo $hgversion | grep -- '-' > /dev/null 2>&1; then
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
11 # nightly build case, version is like 1.3.1+250-20b91f91f9ca
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
12 version=`echo $hgversion | cut -d- -f1`
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
13 release=`echo $hgversion | cut -d- -f2 | sed -e 's/+.*//'`
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
14 else
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
15 # official tag, version is like 1.3.1
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
16 version=`echo $hgversion | sed -e 's/+.*//'`
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
17 release='0'
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
18 fi
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
19 }