Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/sets Factor out print_set_files() printing raw set l...
details: https://anonhg.NetBSD.org/src/rev/d670c0758780
branches: trunk
changeset: 750068:d670c0758780
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Tue Dec 15 05:11:08 2009 +0000
description:
Factor out print_set_files() printing raw set list entries out of
list_set_files(). While here kill a useless-use-of-cat.
diffstat:
distrib/sets/sets.subr | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
diffs (55 lines):
diff -r 37f8c4064aa1 -r d670c0758780 distrib/sets/sets.subr
--- a/distrib/sets/sets.subr Tue Dec 15 05:07:11 2009 +0000
+++ b/distrib/sets/sets.subr Tue Dec 15 05:11:08 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: sets.subr,v 1.115 2009/12/15 05:07:11 uebayasi Exp $
+# $NetBSD: sets.subr,v 1.116 2009/12/15 05:11:08 uebayasi Exp $
#
#
@@ -173,7 +173,7 @@
# In each file, a record consists of a path and a System Package name,
# separated by whitespace. E.g.,
#
-# # $NetBSD: sets.subr,v 1.115 2009/12/15 05:07:11 uebayasi Exp $
+# # $NetBSD: sets.subr,v 1.116 2009/12/15 05:11:08 uebayasi Exp $
# . base-sys-root [keyword[,...]]
# ./altroot base-sys-root
# ./bin base-sys-root
@@ -260,15 +260,7 @@
else
verbose=true
fi
- for setname; do
- list=`list_set_lists $setname`
- for l in $list; do
- echo $l
- if $verbose; then
- echo >&2 "DEBUG: list_set_files: $l"
- fi
- done
- done | xargs cat | ${SED} ${SUBST} | \
+ print_set_lists "$@" | \
${AWK} -v obsolete=${obsolete} '
BEGIN {
if (obsolete)
@@ -475,6 +467,19 @@
done
}
+print_set_lists()
+{
+ for setname; do
+ list=`list_set_lists $setname`
+ for l in $list; do
+ echo $l
+ if $verbose; then
+ echo >&2 "DEBUG: list_set_files: $l"
+ fi
+ done
+ done | xargs ${SED} ${SUBST}
+}
+
# arch_to_cpu mach
#
# Print the ${MACHINE_CPU} for ${MACHINE_ARCH}=mach,
Home |
Main Index |
Thread Index |
Old Index