##// END OF EJS Templates
packaging: blindly factor out trap's cleanup function in builddeb...
muxator -
r40140:33823055 default
parent child Browse files
Show More
@@ -13,6 +13,13 b' CLEANUP=1'
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
17 cleanup() {
18 if [ '$CLEANUP' ]; then
19 rm -r '$PWD/debian';
20 fi
21 }
22
16 while [ "$1" ]; do
23 while [ "$1" ]; do
17 case "$1" in
24 case "$1" in
18 --distid )
25 --distid )
@@ -44,7 +51,7 b' while [ "$1" ]; do'
44 esac
51 esac
45 done
52 done
46
53
47 trap "if [ '$CLEANUP' ] ; then rm -r '$PWD/debian' ; fi" EXIT
54 trap 'cleanup' EXIT
48
55
49 set -u
56 set -u
50
57
General Comments 0
You need to be logged in to leave comments. Login now