wok view fatattr/stuff/fatattr.sh @ rev 15522
Up: thunderbird-langpack-sl (17.0.10esr)
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Tue Nov 19 22:24:32 2013 +0100 (2013-11-19) |
parents | |
children | 46a4ae996aa7 |
line source
1 #!/bin/sh
3 ATTRS=.fatattr
5 cdfat() {
6 fatattr $1 > /dev/null && cd $1
7 }
9 case "${1/--/-}" in
10 -s*) find ${3:-.} -exec fatattr {} \; > ${2:-$ATTRS} ;;
11 -r*) while read line; do
12 fatattr $(echo ${line:0:9} | sed 's/[^ ]/+\0 /g') "$3${line:9}"
13 done < ${2:-$ATTRS} ;;
14 -c*) cdfat ${2:-.} && $0 -s && find . | cpio -o -H newc ;;
15 -[xe]*) cdfat ${2:-.} && cpio -idmu && $0 -r && rm -f $ATTRS ;;
16 *) cat 1>&2 <<EOT
17 Usage: $0 [--save|--restore] [datafile] [root]
18 $0 [--create-cpio|--extract-cpio] [root]
19 EOT
20 esac