diff --git a/vfs/ChangeLog b/vfs/ChangeLog index f37e13b45..46738339b 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,8 @@ +2002-12-12 Pavel Roskin + + * extfs/uar.in: Simplify "list" command, don't use current year. + Use more careful quoting. + 2002-12-12 Adam Byrtek * extfs/apt.in: Add non-interactive remove using dpkg. diff --git a/vfs/extfs/uar.in b/vfs/extfs/uar.in index dbeec9dc7..6b66e0caa 100644 --- a/vfs/extfs/uar.in +++ b/vfs/extfs/uar.in @@ -7,45 +7,31 @@ # (C) 1997, 1998 The Free Software Foundation. # # + XAR=ar -XARINFO="ar tv" -AWK=awk mcarfs_list () { - YEAR=`date '+%Y'` - $XARINFO $1 | @AWK@ -v year=$YEAR ' - { - date = $(NF-1) - if(date == year) { - date = $(NF-2); - } - perms = substr($1, 1, 9); - split($2, id, "/"); - if(NF > 8) { - id[2] = $3; - } - printf("-%9s 1 %8d %8d %8d %s %s %s %s\n", perms, id[1], id[2], $(NF-5), $(NF-4), $(NF-3), date, $(NF)); - }' 2>/dev/null + $XAR tv "$1" | sed 's,^,-,;s, , 1 ,;s,/, ,' } mcarfs_copyout () { - $XAR p $1 $2 > $3 + $XAR p "$1" "$2" > "$3" } mcarfs_copyin () { TMPDIR=/tmp/mctmpdir-uar.$$ mkdir $TMPDIR || exit 1 - name=`basename $2` - (cd $TMPDIR && cp -f $3 $name && $XAR r $1 $name) - rm -rf $TMPDIR + name=`basename "$2"` + (cd $TMPDIR && cp -f "$3" $name && $XAR r "$1" $name) + rm -rf $TMPDIR } mcarfs_rm () { - $XAR d $1 $2 + $XAR d "$1" "$2" } # override any locale for dates @@ -54,7 +40,7 @@ export LC_ALL umask 077 case "$1" in - list) mcarfs_list $2 ;; + list) mcarfs_list "$2" ;; copyout) shift; mcarfs_copyout "$@" ;; copyin) shift; mcarfs_copyin "$@" ;; rm) shift; mcarfs_rm "$@" ;;