Jakub Filak a73f50
From 119fb61675555c049ce9251b4ee0e3c72caf0b0f Mon Sep 17 00:00:00 2001
Jakub Filak a73f50
From: Jakub Filak <jfilak@redhat.com>
Jakub Filak a73f50
Date: Mon, 15 Sep 2014 13:43:10 +0200
Jakub Filak a73f50
Subject: [PATCH 30/39] cli: use portable syntax in abrt-console-notification
Jakub Filak a73f50
Jakub Filak a73f50
Thanks Dominic Cleal
Jakub Filak a73f50
Jakub Filak a73f50
Resolves rhbz#1141485
Jakub Filak a73f50
Related to rhbz#1139001
Jakub Filak a73f50
Jakub Filak a73f50
Signed-off-by: Jakub Filak <jfilak@redhat.com>
Jakub Filak a73f50
---
Jakub Filak a73f50
 src/cli/abrt-console-notification.sh | 10 +++++-----
Jakub Filak a73f50
 1 file changed, 5 insertions(+), 5 deletions(-)
Jakub Filak a73f50
Jakub Filak a73f50
diff --git a/src/cli/abrt-console-notification.sh b/src/cli/abrt-console-notification.sh
Jakub Filak a73f50
index 0090747..849273c 100755
Jakub Filak a73f50
--- a/src/cli/abrt-console-notification.sh
Jakub Filak a73f50
+++ b/src/cli/abrt-console-notification.sh
Jakub Filak a73f50
@@ -19,21 +19,21 @@ SINCEFILE="$LPATHDIR/lastnotification"
Jakub Filak a73f50
 
Jakub Filak a73f50
 if [ ! -f "$LPATHDIR" ]; then
Jakub Filak a73f50
     # It might happen that user doesn't have write access on his home.
Jakub Filak a73f50
-    mkdir -p "$LPATHDIR" &> "$ABRT_DEBUG_LOG" || exit 0
Jakub Filak a73f50
+    mkdir -p "$LPATHDIR" >"$ABRT_DEBUG_LOG" 2>&1 || exit 0
Jakub Filak a73f50
 fi
Jakub Filak a73f50
 
Jakub Filak a73f50
 TMPPATH=`mktemp --tmpdir="$LPATHDIR" lastnotification.XXXXXXXX 2> "$ABRT_DEBUG_LOG"`
Jakub Filak a73f50
 
Jakub Filak a73f50
 SINCE=0
Jakub Filak a73f50
 if [ -f "$SINCEFILE" ]; then
Jakub Filak a73f50
-    SINCE=`cat $SINCEFILE 2> "$ABRT_DEBUG_LOG"`
Jakub Filak a73f50
+    SINCE=`cat $SINCEFILE 2>"$ABRT_DEBUG_LOG"`
Jakub Filak a73f50
 fi
Jakub Filak a73f50
 
Jakub Filak a73f50
 # always update the lastnotification
Jakub Filak a73f50
 if [ -f "$TMPPATH" ]; then
Jakub Filak a73f50
     # Be quite in case of errors and don't scare users by strange error messages.
Jakub Filak a73f50
-    date +%s > "$TMPPATH" 2> "$ABRT_DEBUG_LOG"
Jakub Filak a73f50
-    mv -f "$TMPPATH" "$SINCEFILE" &> "$ABRT_DEBUG_LOG"
Jakub Filak a73f50
+    date +%s > "$TMPPATH" 2>"$ABRT_DEBUG_LOG"
Jakub Filak a73f50
+    mv -f "$TMPPATH" "$SINCEFILE" >"$ABRT_DEBUG_LOG" 2>&1
Jakub Filak a73f50
 fi
Jakub Filak a73f50
 
Jakub Filak a73f50
-abrt-cli status --since="$SINCE" 2> "$ABRT_DEBUG_LOG"
Jakub Filak a73f50
+abrt-cli status --since="$SINCE" 2>"$ABRT_DEBUG_LOG"
Jakub Filak a73f50
-- 
Jakub Filak a73f50
2.1.0
Jakub Filak a73f50