3 # $NetBSD: listpkgs,v 1.11 2006/01/03 18:31:09 apb Exp $
5 # List all packages in the given pkgset by parsing the list files.
8 rundir
="$(dirname "$0")" # ${0%/*} isn't good enough when there's no "/"
9 .
"${rundir}/sets.subr"
16 Usage: ${0##*/} [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
17 -a arch set arch (e.g, m68k, mips, powerpc) [${MACHINE_ARCH}]
18 -m machine set machine (e.g, amiga, i386, macppc) [${MACHINE}]
19 -s setsdir directory to find sets [${setsdir}]
20 setname set to list packages for
26 while getopts a
:m
:s
: ch
; do
29 MACHINE_ARCH
="${OPTARG}"
30 MACHINE_CPU
="$(arch_to_cpu "${OPTARG}")"
43 shift $
((${OPTIND} - 1))
49 list_set_files
"${setname}" | ${AWK} '{print $2}' | ${SORT} -u