5 # Source of zoo can be found at
6 # ftp://ftp.ibiblio.org/pub/Linux/utils/compress/
10 # Stupid zoo won't work if the archive name has no .zoo extension, so we
11 # have to make a symlink with a "better" name. Also, zoo can create
12 # directories even if printing files to stdout, so it's safer to confine
13 # it to a temporary directory.
16 TMPDIR
=`mktemp -d ${MC_TMPDIR:-/tmp}/mctmpdir-uzoo.XXXXXX` ||
exit 1
17 trap 'cd /; rm -rf "$TMPDIR"' 0 1 2 3 5 13 15
18 ARCHIVE
="$TMPDIR/tmp.zoo"
19 ln -sf "$1" "$ARCHIVE"
20 cd "$TMPDIR" ||
exit 1
26 $ZOO lq
"$ARCHIVE" | @AWK@
-v uid
=$
(id
-ru) '
39 printf "drwxr-xr-x 1 %-8d %-8d %8d %s %2d %4d %02d:%02d %s\n", uid, 0, $1, $5, $4, $6, a[1], a[2], $8
41 printf "-rw-r--r-- 1 %-8d %-8d %8d %s %2d %4d %02d:%02d %s\n", uid, 0, $1, $5, $4, $6, a[1], a[2], $8
49 # zoo only accepts name without directory as file to extract
50 base
=`echo "$2" | sed 's,.*/,,'`
51 $ZOO xpq
: "$ARCHIVE" "$base" > "$3"
61 list
) mczoofs_list
"$@" ;;
62 copyout
) mczoofs_copyout
"$@" ;;