Ticket #2707: 2707-0003-extfs-u7z-sed-portability.patch

File 2707-0003-extfs-u7z-sed-portability.patch, 1.5 KB (added by mooffie, 8 years ago)
  • src/vfs/extfs/helpers/u7z

    From 963ebdba84006f46ad9964614a1bc4f59a8d9c79 Mon Sep 17 00:00:00 2001
    From: Mooffie <mooffie@gmail.com>
    Date: Mon, 19 Dec 2016 02:07:56 +0200
    Subject: [PATCH 3/6] Ticket #2707: extfs: u7z: sed portability.
    
    '\s' is not portable.
    ---
     src/vfs/extfs/helpers/u7z | 5 +++--
     1 file changed, 3 insertions(+), 2 deletions(-)
    
    diff --git a/src/vfs/extfs/helpers/u7z b/src/vfs/extfs/helpers/u7z
    index 52d123d..6641ccf 100755
    a b mcu7zip_list () 
    2828 
    2929        date_re='^\(....\)-\(..\)-\(..\) \(..:..:..\)' # 19 chars. 
    3030        date_mc='\2-\3-\1 \4' 
     31        empty_date_re='^ \{19\}' 
    3132 
    3233        size_re='............' # 12 chars. 
    3334        empty_size_re=' \{12\}' 
    mcu7zip_list () 
    5253 
    5354                  # Handle directories. 
    5455                  s/$date_re D.... $size_re $size_re\(.*\)/drwxr-xr-x 1 $ugid 0 $date_mc \5/p 
    55                        s/^\s*D.... $size_re $size_re\(.*\)/drwxr-xr-x 1 $ugid 0 $date_archive \1/p 
     56            s/$empty_date_re D.... $size_re $size_re\(.*\)/drwxr-xr-x 1 $ugid 0 $date_archive \1/p 
    5657 
    5758                  # Handle normal files. 
    5859                  s/$date_re \..... \($size_re\) $size_re\(.*\)/-rw-r--r-- 1 $ugid \5 $date_mc \6/p 
    59                        s/^\s*\..... \($size_re\) $size_re\(.*\)/-rw-r--r-- 1 $ugid \1 $date_archive \2/p 
     60            s/$empty_date_re \..... \($size_re\) $size_re\(.*\)/-rw-r--r-- 1 $ugid \1 $date_archive \2/p 
    6061        " 
    6162} 
    6263