diff options
author | dmcmahill <dmcmahill@pkgsrc.org> | 2003-07-25 12:58:20 +0000 |
---|---|---|
committer | dmcmahill <dmcmahill@pkgsrc.org> | 2003-07-25 12:58:20 +0000 |
commit | bcee7aab521a92503014ad825afdc4aa7a4dbf1e (patch) | |
tree | 7ed7dc7f468eb03bcc7b84e8683c2e0f1c02c08b /mk/scripts | |
parent | 698c2fe632d2cb67bcbaf55cdaa8c74703b9b976 (diff) | |
download | pkgsrc-bcee7aab521a92503014ad825afdc4aa7a4dbf1e.tar.gz |
- fix bug that gave an invalid entry in the homepage field when there is
no listed homepage. Thanks to Grant Beattie for noting this and providing a
patch which I changed slightly.
- fix a bug which put extra stuff in the categories field. Thanks to Grant
for noting this.
Diffstat (limited to 'mk/scripts')
-rwxr-xr-x | mk/scripts/genindex.awk | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/mk/scripts/genindex.awk b/mk/scripts/genindex.awk index b7ae234fd25..626e253d071 100755 --- a/mk/scripts/genindex.awk +++ b/mk/scripts/genindex.awk @@ -1,5 +1,5 @@ #!/usr/bin/awk -f -# $NetBSD: genindex.awk,v 1.2 2003/07/24 22:27:17 dmcmahill Exp $ +# $NetBSD: genindex.awk,v 1.3 2003/07/25 12:58:20 dmcmahill Exp $ # # Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. # All rights reserved. @@ -124,7 +124,13 @@ BEGIN { } /^categories /{ - categories[$2] = substr($0, index($0, $3)); + # note: we pick out the categories slightly differently than the comment + # and homepage because the category name will be included in the directory + # name and hence the index() call points to the wrong location + categories[$2] = $3; + for(i = 4; i <= NF; i = i + 1) { + categories[$2] = categories[$2] " " $i; + } next; } @@ -139,7 +145,11 @@ BEGIN { } /^homepage /{ - homepage[$2] = substr($0, index($0, $3)); + if( NF>=3 ) { + homepage[$2] = substr($0, index($0, $3)); + } else { + homepage[$2] = ""; + } next; } |