wok-6.x view fatattr/stuff/fatattr.sh @ rev 16497
openssl: fix ARM cook
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Apr 23 17:05:52 2014 +0200 (2014-04-23) |
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