From patchwork Tue Oct 9 21:29:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [5,of,6] packaging: cleanup() did not read the value of $CLEANUP From: via Mercurial-devel X-Patchwork-Id: 35592 Message-Id: <4d7d83159122473ab69f.1539120567@cuben.lan> To: mercurial-devel@mercurial-scm.org Date: Tue, 09 Oct 2018 23:29:27 +0200 # HG changeset patch # User muxator # Date 1539116678 -7200 # Tue Oct 09 22:24:38 2018 +0200 # Node ID 4d7d83159122473ab69f9b9c16fab69d10232d78 # Parent 374fcdd01ef6b813d578d865eaccb94d3cda5dc8 packaging: cleanup() did not read the value of $CLEANUP When the original author put CLEANUP in a conditional statement he was probably willing to use it to control the "if". This change tries to restore that behaviour: the "rm" clause is triggered if and only if CLEANUP is defined and not empty. diff --git a/contrib/packaging/builddeb b/contrib/packaging/builddeb --- a/contrib/packaging/builddeb +++ b/contrib/packaging/builddeb @@ -15,7 +15,7 @@ CODENAME=`lsb_release -cs 2> /dev/null | DEBFLAGS=-b cleanup() { - if [ '$CLEANUP' ]; then + if [ "$CLEANUP" ]; then rm -r "$PWD/debian"; fi }