Ticket #1467: 01_bashism.patch

File 01_bashism.patch, 1.3 KB (added by narcan, 10 years ago)
  • mc-4.6.2~git20090529

    Fix bashism
    old new  
    4545        #first we check if we have old p7zip archive with prefix ./ in filename 
    4646        $P7ZIP l "$1" "$2" | grep -q "0 files" && \ 
    4747        EXFNAME=*./"$2" || EXFNAME="$2" 
    48         $P7ZIP d "$1" "$EXFNAME" 2>&1 | grep -q E_NOTIMPL &> /dev/null && \ 
    49         { echo -e "Function not implemented...\n7z cannot delete from solid archive." >&2 ; exit 1 ; } 
     48        $P7ZIP d "$1" "$EXFNAME" 2>&1 | grep -q E_NOTIMPL > /dev/null 2>&1 && \ 
     49        { printf "Function not implemented...\n7z cannot delete from solid archive." >&2 ; exit 1 ; } 
    5050} 
    5151 
    5252mcu7zip_rmdir () 
     
    5454        #first we check if we have old p7zip archive with prefix ./ in filename 
    5555        $P7ZIP l "$1" "$2" | grep -q "0 files" && \ 
    5656        EXFNAME=*./"$2" || EXFNAME="$2" 
    57         $P7ZIP d "$1" "$EXFNAME"/ 2>&1 | grep -q E_NOTIMPL &> /dev/null && \ 
    58         { echo -e "Function not implemented...\n7z cannot delete from solid archive." >&2 ; exit 1 ; } 
     57        $P7ZIP d "$1" "$EXFNAME"/ 2>&1 | grep -q E_NOTIMPL > /dev/null 2>&1 && \ 
     58        { printf "Function not implemented...\n7z cannot delete from solid archive." >&2 ; exit 1 ; } 
    5959} 
    6060 
    6161# override any locale for dates