Mercurial > public > mercurial-scm > hg
diff contrib/builddeb @ 24972:56c64c91b429
packaging: extract packagelib for common code from builddeb and buildrpm
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 07 May 2015 10:28:58 -0400 |
parents | ab75baaf81d5 |
children | e5f2a2a095cb |
line wrap: on
line diff
--- a/contrib/builddeb Wed May 06 13:13:54 2015 -0400 +++ b/contrib/builddeb Thu May 07 10:28:58 2015 -0400 @@ -4,6 +4,8 @@ # # Tested on Jessie (stable as of original script authoring.) +. $(dirname $0)/packagelib.sh + BUILD=1 DEBBUILDDIR="$PWD/debbuild" while [ "$1" ]; do @@ -34,23 +36,7 @@ exit 1 fi -# build local hg and use it -python setup.py build_py -c -d . -HG="$PWD/hg" - -$HG version > /dev/null || { echo 'abort: hg version failed!'; exit 1 ; } - -hgversion=`$HG version | sed -ne 's/.*(version \(.*\))$/\1/p'` - -if echo $hgversion | grep -- '-' > /dev/null 2>&1; then - # nightly build case, version is like 1.3.1+250-20b91f91f9ca - version=`echo $hgversion | cut -d- -f1` - release=`echo $hgversion | cut -d- -f2 | sed -e 's/+.*//'` -else - # official tag, version is like 1.3.1 - version=`echo $hgversion | sed -e 's/+.*//'` - release='0' -fi +gethgversion cp -r $PWD/contrib/debian $DEBBUILDDIR/DEBIAN chmod -R 0755 $DEBBUILDDIR/DEBIAN