diff options
author | jlam <jlam> | 2006-03-14 15:32:18 +0000 |
---|---|---|
committer | jlam <jlam> | 2006-03-14 15:32:18 +0000 |
commit | 2600e41348b95a073d29448e1571341fe82a5e91 (patch) | |
tree | 41fddf412b347a567b64c2675f9b06ed29883188 /mk/plist | |
parent | fd988f9a6dfb81518ced531a10d5c416ccca7a2e (diff) | |
download | pkgsrc-2600e41348b95a073d29448e1571341fe82a5e91.tar.gz |
Restructure pattern-actions a bit so that we're not lumping everything
into the last action. This makes it easier to understand the flow.
Diffstat (limited to 'mk/plist')
-rw-r--r-- | mk/plist/plist-info.awk | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/mk/plist/plist-info.awk b/mk/plist/plist-info.awk index 87c1d67375c..543c2a660cb 100644 --- a/mk/plist/plist-info.awk +++ b/mk/plist/plist-info.awk @@ -1,4 +1,4 @@ -# $NetBSD: plist-info.awk,v 1.6 2006/03/04 22:06:03 jlam Exp $ +# $NetBSD: plist-info.awk,v 1.7 2006/03/14 15:32:18 jlam Exp $ # # Copyright (c) 2006 The NetBSD Foundation, Inc. # All rights reserved. @@ -62,26 +62,38 @@ BEGIN { } ### +### Canonicalize info page entries by stripping any ".gz" suffixes. +### +/^[^@]/ && /^([^\/]*\/)*info\/[^\/]*(\.info)?-[0-9]+\.gz$/ { + sub("\\.gz$", "") +} + +### ### Ignore *-1, *-2, etc. files in the PLIST as we get the list of ### installed split files below. ### -/^[^@]/ && /^([^\/]*\/)*info\/[^\/]*(\.info)?-[0-9]+(\.gz)?$/ { +/^[^@]/ && /^([^\/]*\/)*info\/[^\/]*(\.info)?-[0-9]+$/ { next } ### -### For each info page entry, print all of the installed info sub-pages -### associated with that entry. +### Convert info/ to ${INFO_DIR}/ for all info page entries. ### -/^[^@]/ && /^([^\/]*\/)*info\/[^\/]*(\.info)?(\.gz)?$/ { - if (match($0, "^info/") > 0) { +/^[^@]/ && /^([^\/]*\/)*info\/[^\/]*(\.info)?$/ { + if ($0 ~ "^info/") { sub("^info/", INFO_DIR "/") } else { sub("/info/", "/" INFO_DIR "/") } - cmd = TEST " -f " PREFIX "/" $0 +} + +### +### For each info page entry, print all of the installed info sub-pages +### associated with that entry. +### +/^[^@]/ && ($0 ~ "^([^\/]*\/)*" INFO_DIR "\/[^\/]*(\.info)?$") { + cmd = TEST " -f " PREFIX "/" $0 " -o -f " PREFIX "/" $0 ".gz" if (system(cmd) == 0) { - sub("\\.gz$", "") base = $0 cmd = "cd " PREFIX " && " LS " -1 " base "*" while (cmd | getline) { |