# HG changeset patch # User Pascal Bellard # Date 1422542978 -3600 # Node ID 46a4ae996aa7ba313c8820dbdc552e60089d4983 # Parent 705629de834cff298db520ae904e02d22ef48581 fatattr: fix fatattr.sh --restore diff -r 705629de834c -r 46a4ae996aa7 fatattr/stuff/fatattr.sh --- a/fatattr/stuff/fatattr.sh Thu Jan 29 13:01:35 2015 +0100 +++ b/fatattr/stuff/fatattr.sh Thu Jan 29 15:49:38 2015 +0100 @@ -8,9 +8,8 @@ case "${1/--/-}" in -s*) find ${3:-.} -exec fatattr {} \; > ${2:-$ATTRS} ;; --r*) while read line; do - fatattr $(echo ${line:0:9} | sed 's/[^ ]/+\0 /g') "$3${line:9}" - done < ${2:-$ATTRS} ;; +-r*) sed -e 's/^\(.\{0,8\}\)/\1=/' -e ':a;s/^\([^ =]*\)\ /\1/;ta' \ + -e 's/^/fatattr +/;s/=//' < ${2:-$ATTRS} | sh ;; -c*) cdfat ${2:-.} && $0 -s && find . | cpio -o -H newc ;; -[xe]*) cdfat ${2:-.} && cpio -idmu && $0 -r && rm -f $ATTRS ;; *) cat 1>&2 <