3 # Written by Alex Kuchma <ask@bcs.zp.ua>
4 # Alex Tkachenko <alex@bcs.zp.ua>
5 # Updated by Vitezslav Samel <xsamel00@dcse.fee.vutbr.cz>
7 # (C) 1997, 1998 The Free Software Foundation.
15 # If $temp_replace string is part of the filename that part might get lost
16 temp_replace
='Unique Separator String'
18 $XAR tv
"$1" |
sed 's,^,-,;s, , 1 ,;s,/, ,' |
19 sed -e "s/\( [0-2][0-9]\:[0-5][0-9]\)\( $thisyear \)\(.*\)/\1$temp_replace\3/" |
20 sed -e "s/\( [0-2][0-9]\:[0-5][0-9] \)\([12][0-9][0-9][0-9] \)\(.*\)/ \2\3/" |
21 sed -e "s/$temp_replace/ /"
26 $XAR p
"$1" "$2" > "$3"
31 TMPDIR
=`mktemp -d "${MC_TMPDIR:-/tmp}/mctmpdir-uar.XXXXXX"` ||
exit 1
33 (cd "$TMPDIR" && cp -fp "$3" "$name" && $XAR r
"$1" "$name")
42 # override any locale for dates
48 list
) mcarfs_list
"$2" ;;
49 copyout
) shift; mcarfs_copyout
"$@" ;;
50 copyin
) shift; mcarfs_copyin
"$@" ;;
51 rm) shift; mcarfs_rm
"$@" ;;
53 echo "mcarfs: ar archives cannot contain directories." 1>&2
56 echo "mcarfs: unknown command: \"$1\"." 1>&2