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

Antonio Muci a.mux at inwind.it
Tue Oct 9 21:29:27 UTC 2018


# HG changeset patch
# User muxator <a.mux at 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.

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
 }


More information about the Mercurial-devel mailing list