Mercurial > hg-stable
changeset 27212:ef9301ce6046
builddeb: read default distribution and codename from lsb_release
This makes `make deb` place packages into a more appropriately named directory
instead of just "debian-unknown".
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 25 Nov 2015 18:07:33 +0800 |
parents | a624bae2aebf |
children | ccae1588117f |
files | Makefile contrib/builddeb |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Wed Nov 25 15:26:03 2015 +0800 +++ b/Makefile Wed Nov 25 18:07:33 2015 +0800 @@ -161,8 +161,7 @@ rm -rf dist/mercurial-*.mpkg deb: - mkdir -p packages/debian-unknown - contrib/builddeb --distid debian --codename unknown + contrib/builddeb docker-debian-jessie: mkdir -p packages/debian-jessie
--- a/contrib/builddeb Wed Nov 25 15:26:03 2015 +0800 +++ b/contrib/builddeb Wed Nov 25 18:07:33 2015 +0800 @@ -8,8 +8,8 @@ BUILD=1 CLEANUP=1 -DISTID=debian -CODENAME=jessie +DISTID=`(lsb_release -is 2> /dev/null | tr '[:upper:]' '[:lower:]') || echo debian` +CODENAME=`lsb_release -cs 2> /dev/null || echo unknown` while [ "$1" ]; do case "$1" in --distid ) @@ -84,6 +84,7 @@ if [ "$CLEANUP" ] ; then echo OUTPUTDIR=${OUTPUTDIR:=packages/$DISTID-$CODENAME} + mkdir -p "$OUTPUTDIR" find ../mercurial*.deb ../mercurial_*.build ../mercurial_*.changes \ -type f -newer $control -print0 | \ xargs -Inarf -0 mv narf "$OUTPUTDIR"