diff options
author | wiz <wiz@pkgsrc.org> | 2004-01-06 14:43:02 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2004-01-06 14:43:02 +0000 |
commit | f35aaaa301e1aedf124ea9aa85fd2d343129c9ac (patch) | |
tree | c569af65bb580caccd3797c4cd6e59369548ddcc | |
parent | 3916c9cc63fc858b9c19cecae003d9c168353ea7 (diff) | |
download | pkgsrc-f35aaaa301e1aedf124ea9aa85fd2d343129c9ac.tar.gz |
Fix awk warnings in MASTER_SORT* code.
From Stoned Elipot (seb@).
-rw-r--r-- | mk/bsd.pkg.mk | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index b0e08e97856..e0b526e492c 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1337 2004/01/06 09:30:41 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1338 2004/01/06 14:43:02 wiz Exp $ # # This file is in the public domain. # @@ -1622,14 +1622,14 @@ MASTER_SORT?= MASTER_SORT_REGEX?= MASTER_SORT_REGEX+= ${MASTER_SORT:S/./\\./g:C/.*/:\/\/[^\/]*&\//} -MASTER_SORT_AWK= BEGIN { RS = " "; ORS = " "; IGNORECASE = 1 ; gl = "${MASTER_SORT_REGEX}"; } +MASTER_SORT_AWK= BEGIN { RS = " "; ORS = " "; IGNORECASE = 1 ; gl = "${MASTER_SORT_REGEX:S/\\/\\\\/g}"; } . for srt in ${MASTER_SORT_REGEX} -MASTER_SORT_AWK+= /${srt:C/\//\\\//g}/ { good["${srt}"] = good["${srt}"] " " $$0 ; next; } +MASTER_SORT_AWK+= /${srt:C/\//\\\//g}/ { good["${srt:S/\\/\\\\/g}"] = good["${srt:S/\\/\\\\/g}"] " " $$0 ; next; } . endfor MASTER_SORT_AWK+= { rest = rest " " $$0; } END { n=split(gl, gla); for(i=1;i<=n;i++) { print good[gla[i]]; } print rest; } SORT_SITES_CMD= ${ECHO} $$unsorted_sites | ${AWK} '${MASTER_SORT_AWK}' -ORDERED_SITES= ${_MASTER_SITE_OVERRIDE} `${SORT_SITES_CMD:C/"/\"/g}` +ORDERED_SITES= ${_MASTER_SITE_OVERRIDE} `${SORT_SITES_CMD:S/\\/\\\\/g:C/"/\"/g}` .else ORDERED_SITES= ${_MASTER_SITE_OVERRIDE} $$unsorted_sites .endif |