3 # Written by Jakub Jelinek 1995
4 # Updated by Christian Gennerat 1999
6 # (C) 1995,1999 The Free Software Foundation.
14 XZIPINFO="$DZIP/unzip -Z"
16 #If you don't have zipinfo, set ZIPINFO=
22 if test -n "$XZIPINFO"; then
24 $XZIPINFO -l "$1" | @AWK@ -v uid=${UID-0} -v zipfile="$1" -v xunzip=${XUNZIP-unzip} '
26 /^[0-9]*\ file/ { next }
33 cmd=xunzip " -p " zipfile " " nam
34 cmd | getline linkname
47 printf "%s 1 %-8d %-8d %8d %3s %2d %4d %s %s%s%s\n", $1, uid, 0, $4, a[2], a[1], a[3], $9, nam, arrow, linkname
53 if test $? = 214; then
57 if test -n "$DOZIPINFO"; then
58 $XUNZIP -v "$1" | @AWK@ -v uid=${UID-0} '
62 /^\ ?------/ { if (hyphens > 0) exit 0; hyphens=1; next }
64 if (hyphens < 1) next;
68 printf "drwxr-xr-x 1 %-8d %-8d %8d %s %s %s\n", uid, 0, $1, $5, $6, $8
70 printf "-rw-r--r-- 1 %-8d %-8d %8d %s %s %s\n", uid, 0, $1, $5, $6, $8
77 # preserve pwd. It is clean, but is it necessary?
79 # Create a directory and create in it a tmp directory with the good name
84 $XZIP "$1" "$2" &>/dev/null
91 # preserve pwd. It is clean, but is it necessary?
93 # Create a directory and copy in it the tmp file with the good name
97 # if file is to be written upper in the archive tree, make fake dir
98 if test "$di" != "${2##*/}" ; then
101 # (cp -p) to preserve date, but $2 is dated now!
103 $XZIP "$1" "$2" >/dev/null
110 $XUNZIP -p "$1" "$2" > "$3" 2>/dev/null
115 $XDZIP "$1" "$2" &>/dev/null
120 $XDZIP "$1" "$2"/ &>/dev/null
125 #echo "`date +%T` ${0##*/} $1 $2 to=$3 tmp=$4" >>/tmp/${0##*/}.log
127 list) mczipfs_list "$2"; exit 0;;
128 rm) mczipfs_rm "$2" "$3" ; exit 0;;
129 rmdir) mczipfs_rmdir "$2" "$3" ; exit 0;;
130 mkdir) mczipfs_mkdir "$2" "$3" ; exit 0;;
131 copyin) mczipfs_copyin "$2" "$3" "$4" ; exit 0;;
132 copyout) mczipfs_copyout "$2" "$3" "$4" ; exit 0;;