ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS/gnome-vfs2-2.3.8-1.src.rpm
[gnome-vfs-httpcaptive.git] / modules / extfs / arj
1 #! /bin/sh
2 #
3 # Copyright 1998 Pavel Machek,
4 # partly based on zip by Jakub Jelinek 1995
5 #
6 # Distribute in terms of GPL.
7 #
8 #
9 ARJ=mcunarj
10
11 mcarjfs_list ()
12 {
13 $ARJ v $1 | awk -v uid=${UID-0} '
14 BEGIN { hyphens=0 }
15 /^----------/ { if (hyphens > 0) exit 0; hyphens=1; next }
16
17 if (hyphens < 1) next;
18 path=$1;
19 getline;
20 printf "-rw-r--r--   1 %-8d %-8d %8d %s-%s %s %s\n", uid, 0, $1, substr($4,4), substr($4,1,2), substr($5,1,5), path
21 }' 2>/dev/null
22 }
23
24 mcarjfs_copyout ()
25 {
26 $ARJ p $1 $2 2> $3 > /dev/null
27 }
28
29 umask 077
30 case "$1" in
31   list) mcarjfs_list $2; exit 0;;
32   copyout) mcarjfs_copyout $2 $3 $4; exit 0;;
33 esac
34 exit 1