diff options
author | rillig <rillig@pkgsrc.org> | 2005-11-11 09:18:57 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-11-11 09:18:57 +0000 |
commit | 73ba5f116953592bb013e049a7eb46632cbdb7fa (patch) | |
tree | 83af58ecd920501eea650426c6e933df80a1b188 /mk/bulk | |
parent | 607d363d8cd580d4103e81a4d9931975a680e629 (diff) | |
download | pkgsrc-73ba5f116953592bb013e049a7eb46632cbdb7fa.tar.gz |
Properly handle package directories containing shell special characters
like [], ?, *. They _really_ should not exist, but you never know. While
here, added a rationale for the not-so-obvious :detect_duplicates:
delimiter.
Diffstat (limited to 'mk/bulk')
-rw-r--r-- | mk/bulk/printindex | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/mk/bulk/printindex b/mk/bulk/printindex index 3b39932c1e1..2dfedb47725 100644 --- a/mk/bulk/printindex +++ b/mk/bulk/printindex @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: printindex,v 1.19 2005/11/08 13:55:29 rillig Exp $ +# $NetBSD: printindex,v 1.20 2005/11/11 09:18:57 rillig Exp $ # # # Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -94,6 +94,15 @@ else list=`${GREP} '^[[:space:]]*'SUBDIR */Makefile | ${SED} 's,/Makefile.*=[[:space:]]*,/,'` fi +# +# Print the table of PKGPATH and PKGNAME. +# +# The check for duplicates is necessary to prevents double entries in +# the table. The use of the :detect_duplicates: delimiter prevents the +# inner "case" from occuring too often, as the $done_pkgs string grows +# to about 100k during one run of the program. This saves about +# 40 seconds on a 1 GHz Athlon. +# done_pkgs="" detect_duplicates=no for pkgdir in $list :detect_duplicates: $BULK_PREREQ; do @@ -103,7 +112,7 @@ for pkgdir in $list :detect_duplicates: $BULK_PREREQ; do continue;; esac case $detect_duplicates in yes) - case $done_pkgs in *=${pkgdir}=*) + case $done_pkgs in *="${pkgdir}"=*) continue;; esac;; esac |