wok view fatattr/stuff/fatattr.sh @ rev 20283

security fixes from 0.3.1.9 (2017 Dec 1) and 0.3.1.10 (March 3)... further info: https://blog.torproject.org/new-stable-tor-releases-security-fixes-and-dos-prevention-03210-03110-02915
author Erkan Yilmaz <erkan@slitaz.org>
date Tue Mar 27 11:09:07 2018 +0000 (2018-03-27)
parents 46a4ae996aa7
children
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*) sed -e 's/^\(.\{0,8\}\)/\1=/' -e ':a;s/^\([^ =]*\)\ /\1/;ta' \
12 -e "s/^/fatattr +/;s|= | ${3:-.}/|" < ${2:-$ATTRS} | sh ;;
13 -c*) cdfat ${2:-.} && $0 -s && find . | cpio -o -H newc ;;
14 -[xe]*) cdfat ${2:-.} && cpio -idmu && $0 -r && rm -f $ATTRS ;;
15 *) cat 1>&2 <<EOT
16 Usage: $0 [--save|--restore] [datafile] [root]
17 $0 [--create-cpio|--extract-cpio] [root]
18 EOT
19 esac