[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] ar xN fixes for HEAD
From: |
Albert Chin |
Subject: |
Re: [patch] ar xN fixes for HEAD |
Date: |
Tue, 14 Dec 2004 11:14:01 -0600 |
User-agent: |
Mutt/1.5.6i |
On Tue, Dec 14, 2004 at 11:49:49PM +0900, Peter O'Gorman wrote:
> + $AR t "$f_ex_an_ar_oldlib" | sort | uniq -c \
> + | $EGREP -v '^[ ]*1[ ]' | while read -r count name
Why the $EGREP? Mac OS X?
> + do
> + i=1
> + while test "$i" -le "$count"
On Tru64 UNIX, count == 1 for non-unique objects. Don't you want to
enter the while loop only when $count > 1? That's why I had the
following in my patch:
test "$count" -eq 1 && continue
> + do
> + # Put our $i before any first dot (extension)
> + # Never overwrite any file
> + name_to="$name"
> + while test "X$name_to" = "X$name" || test -f
> "$f_ex_an_ar_dir/$name_to"
> + do
> + name_to=`$ECHO "X$name_to" | $Xsed -e "s/\([[^.]]*\)/\1-$i/"`
> + done
> + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_lib
> '$name' && $MV '$name' '$name_to' && $AR -d \$f_ex_an_ar_lib '$name')" ||
> exit $?
Why not "$AR d" instead of "$AR -d"? You already use "$AR x".
--
albert chin (address@hidden)