summaryrefslogtreecommitdiff
path: root/mk/scripts
diff options
context:
space:
mode:
authordmcmahill <dmcmahill>2003-07-25 12:58:20 +0000
committerdmcmahill <dmcmahill>2003-07-25 12:58:20 +0000
commit72906058343b3bc6ee3b40ae612035ae597539c5 (patch)
tree7ed7dc7f468eb03bcc7b84e8683c2e0f1c02c08b /mk/scripts
parenta4f0021e891d85ad96d1c6c004f745ed0e5bd11a (diff)
downloadpkgsrc-72906058343b3bc6ee3b40ae612035ae597539c5.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-xmk/scripts/genindex.awk16
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;
}