# HG changeset patch # User Rob Landley # Date 1210573399 18000 # Node ID 6baa1338288014944526e17cd07811bd083b68bb # Parent b4077be6c7463b34ceb403950cd76403df362c94 Sort was including the trailing comma and getting the order wrong. (Specifically, it was comparing "sh," with "sha1sum," and putting sha1sum first in generated/newtoys.h so the binary search wasn't finding sha1sum. Alas, you can't feed separate beginning and ending delimiters to "sort -t". The fix is to copy the appropriate field out with sed, duplicate it at the start of the string where it's easy to compare, and then remove it again with a second sed after the sort. diff -r b4077be6c746 -r 6baa13382880 scripts/make.sh --- a/scripts/make.sh Mon May 12 00:52:27 2008 -0500 +++ b/scripts/make.sh Mon May 12 01:23:19 2008 -0500 @@ -22,7 +22,8 @@ done } echo "NEWTOY(toybox, NULL, 0)" > generated/newtoys.h -newtoys | sort -t '(' -k3,3 >> generated/newtoys.h +newtoys | sed 's/\(.*TOY(\)\([^,]*\),\(.*\)/\2 \1\2,\3/' | sort -k 1,1 \ + | sed 's/[^ ]* //' >> generated/newtoys.h # Extract global structure definitions from toys/*.c