Whamcloud - gitweb
LU-1199 lbuild: Fix error handling
[fs/lustre-release.git] / contrib / lbuild / funcs.sh
index bbd7709..53854f7 100644 (file)
@@ -6,16 +6,15 @@ cleanup() {
 error() {
     local msg="$1"
 
-    [ -n "$msg" ] && echo -e "\n${0##*/}: $msg" >&$STDOUT
-
+    if [ -n "$msg" ]; then
+        echo -e "\n${0##*/}: $msg" >&$STDOUT
+    fi
 }
 
 fatal() {
-
     cleanup
     error "$2"
     exit $1
-
 }
 
 #