summaryrefslogtreecommitdiff
path: root/mk/bulk
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-11-19 11:19:10 +0000
committerrillig <rillig@pkgsrc.org>2005-11-19 11:19:10 +0000
commitde8770b8e923cb80a25a84122cd3fa5610fac9b9 (patch)
tree7cd8c2ea65f73a51605c5f979e6cc53a524ae9a2 /mk/bulk
parentb8ed6e2481b260f90008ab33b19b6f3658c924ce (diff)
downloadpkgsrc-de8770b8e923cb80a25a84122cd3fa5610fac9b9.tar.gz
Made the diagnostics for invalid characters in BULK_PREREQ and the
package list more useful by only showing the invalid characters, not the complete variable value.
Diffstat (limited to 'mk/bulk')
-rw-r--r--mk/bulk/printindex14
1 files changed, 8 insertions, 6 deletions
diff --git a/mk/bulk/printindex b/mk/bulk/printindex
index ff60d66edcf..d73da7fde36 100644
--- a/mk/bulk/printindex
+++ b/mk/bulk/printindex
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: printindex,v 1.26 2005/11/19 10:55:45 rillig Exp $
+# $NetBSD: printindex,v 1.27 2005/11/19 11:19:10 rillig Exp $
#
# Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -118,15 +118,17 @@ fi
# Sanity checks, part 2
#
+alnum="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
case $BULK_PREREQ in
-*[!-\ +./0-9A-Z_a-z]*)
- echo "$0: error: BULK_PREREQ contains invalid characters. (Its value is \"${BULK_PREREQ}\".)" 1>&2
+*[!-\ +./${alnum}_]*)
+ inval=`echo "${BULK_PREREQ}" | tr -d " +\\\\-./${alnum}_"`
+ echo "$0: error: BULK_PREREQ contains invalid characters (${inval})." 1>&2
exit 1
esac
case $list in
-*[!-\ +./0-9A-Z_a-z]*)
- echo "$0: error: The package list contains invalid characters. (Its value is \"${list}\".)" 1>&2
- echo "$list" | tr ' ' '\n' > .list
+*[!-\ +./${alnum}_]*)
+ inval=`echo "${list}" | tr -d " +\\\\-./${alnum}_"`
+ echo "$0: error: The package list contains invalid characters (${inval})." 1>&2
exit 1
esac