wok view fatattr/stuff/fatattr.sh @ rev 16815
Up gsettings-desktop-schemas (3.12.2)
author | Yuri Pourre <yuripourre@gmail.com> |
---|---|
date | Thu Jul 10 23:12:54 2014 -0300 (2014-07-10) |
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