lkml.org 
[lkml]   [2005]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ANNOUNCE] git-pasky-0.1
Good lord - you don't need to use arrays for this.

The old-fashioned ways have their ways. Both the 'set'
command and the 'read' command can split args and assign
to distinct variable names.

Try something like the following:

diff-tree -r $id1 $id2 |
sed -e '/^</ { N; s/\n>/ / }' -e 's/./& /' |
while read op mode1 sha1 name1 mode2 sha2 name2
do
... various common stuff ...
case "$op" in
"+")
...
;;
"-")
...
;;
"<")
test $name1 = $name2 || die mismatched names
label1=$(mkbanner "$loc1" $id1 "$name1" $mode1 $sha1)
label2=$(mkbanner "$loc2" $id2 "$name1" $mode2 $sha2)
diff -L "$label1" -L "$label2" -u "$loc1" "$loc2"
;;
esac
done
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@engr.sgi.com> 1.650.933.1373, 1.925.600.0401
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-10 22:51    [from the cache]
©2003-2011 Jasper Spaans