summaryrefslogtreecommitdiff
path: root/mk/plist
diff options
context:
space:
mode:
authorjlam <jlam>2006-05-29 20:01:39 +0000
committerjlam <jlam>2006-05-29 20:01:39 +0000
commit54ba48507e52bd4b1867c140f5a6a39cb7b61155 (patch)
treeabdfc0bd43c2e3794567e9e3e1f5f1efd170a680 /mk/plist
parent9a6200f241c49be0586e32b7834239791333ab5f (diff)
downloadpkgsrc-54ba48507e52bd4b1867c140f5a6a39cb7b61155.tar.gz
When filtering out unrelated info files, only check the last bit of
the name instead of the whole name. This avoids some problems where the file name contains awk-special characters, e.g. +.
Diffstat (limited to 'mk/plist')
-rw-r--r--mk/plist/plist-info.awk8
1 files changed, 4 insertions, 4 deletions
diff --git a/mk/plist/plist-info.awk b/mk/plist/plist-info.awk
index 79f8b81224d..9934c104de6 100644
--- a/mk/plist/plist-info.awk
+++ b/mk/plist/plist-info.awk
@@ -1,4 +1,4 @@
-# $NetBSD: plist-info.awk,v 1.12 2006/04/14 13:23:42 jlam Exp $
+# $NetBSD: plist-info.awk,v 1.13 2006/05/29 20:01:39 jlam Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -108,11 +108,11 @@ BEGIN {
sub("^info/", PKGINFODIR "/")
cmd = TEST " -f " PREFIX "/" $0 " -o -f " PREFIX "/" $0 ".gz"
if (system(cmd) == 0) {
- base = $0
- cmd = "cd " PREFIX " && " LS " -1 " base "*"
+ len = length
+ cmd = "cd " PREFIX " && " LS " -1 " $0 "*"
while (cmd | getline) {
# Filter out unrelated info files
- if ($0 !~ "^" base "(-[0-9]+)?(\.gz)?$") {
+ if (substr($0, len + 1) !~ "^(-[0-9]+)?(\.gz)?$") {
continue
}
#if ((MANZ ~ /[yY][eE][sS]/) && ($0 !~ /\.gz$/)) {