Blob Blame Raw
From 05bf4d55d0316f6048b327399cef0db941db29e8 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Mon, 15 Sep 2014 13:43:10 +0200
Subject: [PATCH] cli: use portable syntax in abrt-console-notification

Thanks Dominic Cleal

Resolves rhbz#1141485
Related to rhbz#1139001

Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
 src/cli/abrt-console-notification.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/cli/abrt-console-notification.sh b/src/cli/abrt-console-notification.sh
index 0090747..849273c 100755
--- a/src/cli/abrt-console-notification.sh
+++ b/src/cli/abrt-console-notification.sh
@@ -19,21 +19,21 @@ SINCEFILE="$LPATHDIR/lastnotification"
 
 if [ ! -f "$LPATHDIR" ]; then
     # It might happen that user doesn't have write access on his home.
-    mkdir -p "$LPATHDIR" &> "$ABRT_DEBUG_LOG" || exit 0
+    mkdir -p "$LPATHDIR" >"$ABRT_DEBUG_LOG" 2>&1 || exit 0
 fi
 
 TMPPATH=`mktemp --tmpdir="$LPATHDIR" lastnotification.XXXXXXXX 2> "$ABRT_DEBUG_LOG"`
 
 SINCE=0
 if [ -f "$SINCEFILE" ]; then
-    SINCE=`cat $SINCEFILE 2> "$ABRT_DEBUG_LOG"`
+    SINCE=`cat $SINCEFILE 2>"$ABRT_DEBUG_LOG"`
 fi
 
 # always update the lastnotification
 if [ -f "$TMPPATH" ]; then
     # Be quite in case of errors and don't scare users by strange error messages.
-    date +%s > "$TMPPATH" 2> "$ABRT_DEBUG_LOG"
-    mv -f "$TMPPATH" "$SINCEFILE" &> "$ABRT_DEBUG_LOG"
+    date +%s > "$TMPPATH" 2>"$ABRT_DEBUG_LOG"
+    mv -f "$TMPPATH" "$SINCEFILE" >"$ABRT_DEBUG_LOG" 2>&1
 fi
 
-abrt-cli status --since="$SINCE" 2> "$ABRT_DEBUG_LOG"
+abrt-cli status --since="$SINCE" 2>"$ABRT_DEBUG_LOG"
-- 
1.9.3