1 # $XConsortium: tar.sh /main/2 1995/07/19 17:13:19 drk $
4 # AT&T Bell Laboratories
5 # @(#)tar.sh (gsf@research.att.com) 04/06/89
7 # tar -> pax interface script
12 Usage: $command c[vwfbB[[0-9][hlm]]] [pathname ...]
13 $command r[vwfbB[[0-9][hlm]]] [files ...]
14 $command t[vwfbB[[0-9][hlm]]
15 $command u[vwfbB[[0-9][hlm]]] [pathname ...]
16 $command x[vwfblmB[[0-9][hlm]]] [pathname ...]"
21 *) echo "$command: one of crtux must be specified$usage" >&2; exit 1 ;;
31 for opt in `echo '' $arg | sed -e 's/^ -//' -e 's/./& /g'`
33 [0-9]) file="-t $opt" ;;
34 [hlm]) case $lastopt in
35 [0-9]) file="${file}$opt" ;;
37 h) options="$options -L" ;;
39 m) r_ok="" options="$options -$opt" ;;
44 [v]) options="$options -$opt" ;;
46 0) echo "$command: blocking factor argument expected$usage" >&2; exit 1 ;;
48 options="$options -b ${1}b"
53 0) echo "$command: file name argument expected$usage" >&2; exit 1 ;;
61 r) r_ok="" options="$options -a" ;;
62 t) w_ok="" list="1" ;;
63 u) r_ok="" options="$options -u" ;;
64 w) options="$options -y" ;;
66 B) options="$options -b 10k" ;;
67 *) echo "$command: invalid option -$opt$usage" >&2; exit 1 ;;
73 "") echo "$command: options inconsistent with archive read" >&2; exit 1 ;;
77 "") echo "$command: options inconsistent with archive write" >&2; exit 1 ;;
82 options="$options -x tar"
88 pax $mode $options $file "$@"