3 # Written by Stas Maximov 1998 SVR4 (UnixWare)
4 # stmax@u213.srcc.msu.su
5 # (C) 1996 The Free Software Foundation.
10 # $1 is the archive name
13 *.cpio.Z) compress -dc "$1"
15 *.cpio.gz) gzip -dc "$1"
19 *) echo "unknown extension"
24 # $1 is the archive name
26 uni_cat "$1" | cpio -itv | @AWK@ '
28 if (substr($9,length($9),1) == ",")
30 tmp = substr($9, 1, length($9)-1);
34 else if (substr($10,length($10),1) == ",")
36 tmp = substr($10, 1, length($10)-1);
46 # $1 is the archive name
47 # $2 is a name of a file within the archive
48 # $3 is a name of a file within the system (to add from or extract to)
50 TMPDIR=/tmp/mctmpdir.$$
51 # FIXME bugzilla.eazel.com 1225: Try harder to generate a unique directory if this fails
52 mkdir -m 0700 $TMPDIR || exit 1
54 uni_cat "$1" | cpio -icumd "$2" 2>/dev/null
66 list) mccpiofs_list $2
69 copyout) mccpiofs_copyout $2 $3 $4