From 5ff73b27ca80d685dfd2d7616270682063bb7629 Mon Sep 17 00:00:00 2001 From: jlam Date: Mon, 29 May 2006 20:01:39 +0000 Subject: 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. +. --- mk/plist/plist-info.awk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mk/plist') 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$/)) { -- cgit v1.2.3