Patchwork [5,of,6] packaging: cleanup() did not read the value of $CLEANUP

login
register
mail settings
Submitter via Mercurial-devel
Date Oct. 9, 2018, 9:29 p.m.
Message ID <4d7d83159122473ab69f.1539120567@cuben.lan>
Download mbox | patch
Permalink /patch/35592/
State New
Headers show

Comments

via Mercurial-devel - Oct. 9, 2018, 9:29 p.m.
# HG changeset patch
# User muxator <a.mux@inwind.it>
# 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.

Patch

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
 }