comparison contrib/packaging/builddeb @ 40106:930bce0741de

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.
author muxator <a.mux@inwind.it>
date Tue, 09 Oct 2018 22:24:38 +0200
parents d3780c8f3180
children 212a52d8e9d8
comparison
equal deleted inserted replaced
40105:d3780c8f3180 40106:930bce0741de
13 DISTID=`(lsb_release -is 2> /dev/null | tr '[:upper:]' '[:lower:]') || echo debian` 13 DISTID=`(lsb_release -is 2> /dev/null | tr '[:upper:]' '[:lower:]') || echo debian`
14 CODENAME=`lsb_release -cs 2> /dev/null || echo unknown` 14 CODENAME=`lsb_release -cs 2> /dev/null || echo unknown`
15 DEBFLAGS=-b 15 DEBFLAGS=-b
16 16
17 cleanup() { 17 cleanup() {
18 if [ '$CLEANUP' ]; then 18 if [ "$CLEANUP" ]; then
19 rm -r "$PWD/debian"; 19 rm -r "$PWD/debian";
20 fi 20 fi
21 } 21 }
22 22
23 while [ "$1" ]; do 23 while [ "$1" ]; do