From c1752bd716c3796f55a0197b87554f603b73034b Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 2 Nov 2011 21:51:08 +0100 Subject: lib/common.sh: Use double brackets Signed-off-by: Lukas Fleischer Signed-off-by: Pierre Schmitz --- lib/common.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/common.sh b/lib/common.sh index feb5080..e826e97 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -58,14 +58,14 @@ stat_done() { } setup_workdir() { - [ -z "$WORKDIR" ] && WORKDIR=$(mktemp -d /tmp/$(basename $0).XXXXXXXXXX) + [[ -z $WORKDIR ]] && WORKDIR=$(mktemp -d /tmp/$(basename $0).XXXXXXXXXX) } cleanup() { trap - EXIT INT QUIT TERM - [ -n "$WORKDIR" ] && rm -rf "$WORKDIR" - [ "$1" ] && exit $1 + [[ -n $WORKDIR ]] && rm -rf "$WORKDIR" + [[ $1 ]] && exit $1 } abort() { -- cgit v1.2.3-24-g4f1b