From c78c4a555a2daf9d30d358f237b0dc0feaf3acab Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Wed, 5 Aug 2009 16:37:36 +0300 Subject: [PATCH] Ticket #1467 (Portability: fix bashism in vfs/extfs/u7z) Fixed bashism in 'mcu7zip_rm' and 'mcu7zip_rmdir' functions. * Use 'printf' instread of 'echo -e' * stderor redirected to /dev/null Thanks to narcan. Signed-off-by: Slava Zanko --- vfs/extfs/u7z | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vfs/extfs/u7z b/vfs/extfs/u7z index b346d05ef..75d0c86e3 100644 --- a/vfs/extfs/u7z +++ b/vfs/extfs/u7z @@ -45,8 +45,8 @@ mcu7zip_rm () #first we check if we have old p7zip archive with prefix ./ in filename $P7ZIP l "$1" "$2" | grep -q "0 files" && \ EXFNAME=*./"$2" || EXFNAME="$2" - $P7ZIP d "$1" "$EXFNAME" 2>&1 | grep -q E_NOTIMPL &> /dev/null && \ - { echo -e "Function not implemented...\n7z cannot delete from solid archive." >&2 ; exit 1 ; } + $P7ZIP d "$1" "$EXFNAME" 2>&1 | grep -q E_NOTIMPL > /dev/null 2>&1 && \ + { printf "Function not implemented...\n7z cannot delete from solid archive." >&2 ; exit 1 ; } } mcu7zip_rmdir () @@ -54,8 +54,8 @@ mcu7zip_rmdir () #first we check if we have old p7zip archive with prefix ./ in filename $P7ZIP l "$1" "$2" | grep -q "0 files" && \ EXFNAME=*./"$2" || EXFNAME="$2" - $P7ZIP d "$1" "$EXFNAME"/ 2>&1 | grep -q E_NOTIMPL &> /dev/null && \ - { echo -e "Function not implemented...\n7z cannot delete from solid archive." >&2 ; exit 1 ; } + $P7ZIP d "$1" "$EXFNAME"/ 2>&1 | grep -q E_NOTIMPL > /dev/null 2>&1 && \ + { printf "Function not implemented...\n7z cannot delete from solid archive." >&2 ; exit 1 ; } } # override any locale for dates