[PATCH] fwts-collect: tidy up error handling

Colin King colin.king at canonical.com
Fri Feb 10 15:44:14 UTC 2012


From: Colin Ian King <colin.king at canonical.com>

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 scripts/fwts-collect |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/fwts-collect b/scripts/fwts-collect
index f8bd12c..37e0042 100755
--- a/scripts/fwts-collect
+++ b/scripts/fwts-collect
@@ -116,8 +116,8 @@ trap 'on_die' TERM INT
 mkdir $TMPDIR
 
 err=$?
-if [ $? -ne 0 ]; then
-	echo "Cannot create temporary directory $TMPDIR: error $?" 1>&2
+if [ $err -ne 0 ]; then
+	echo "Cannot create temporary directory $TMPDIR: error $err" 1>&2
 	exit 1
 fi
 
-- 
1.7.9





More information about the fwts-devel mailing list