Stop duplication of makeflist, regpkg, makeplist code. Use routine
in sets.subr, instead.
This commit is contained in:
parent
2a44e65d9c
commit
4b48743aa1
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: listpkgs,v 1.4 2002/07/23 09:02:45 lukem Exp $
|
||||
# $NetBSD: listpkgs,v 1.5 2003/06/23 09:20:55 dyoung Exp $
|
||||
#
|
||||
# List all packages in the given pkgset by parsing the list files.
|
||||
#
|
||||
@ -12,6 +12,8 @@ arch=${MACHINE_ARCH:-`printf 'xxx:\n\techo ${MACHINE_ARCH}' | ${MAKE} -s -f-`}
|
||||
setd=`dirname $0`
|
||||
prefix=/
|
||||
|
||||
. ./sets.subr
|
||||
|
||||
usage() {
|
||||
exec 1>&2
|
||||
|
||||
@ -67,20 +69,4 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
(
|
||||
cat $setd/lists/$setname/mi
|
||||
if [ "$machine" != "$cpu" -a -f $setd/lists/$setname/ad.${arch} ]; then
|
||||
cat $setd/lists/$setname/ad.${arch}
|
||||
fi
|
||||
if [ -f $setd/lists/$setname/md.${machine} ]; then
|
||||
cat $setd/lists/$setname/md.${machine}
|
||||
fi
|
||||
if [ "$shlib" != "" ]; then
|
||||
if [ -f $setd/lists/$setname/shl.mi ]; then
|
||||
cat $setd/lists/$setname/shl.mi
|
||||
fi
|
||||
if [ -f $setd/lists/$setname/shl.${shlib} ]; then
|
||||
cat $setd/lists/$setname/shl.${shlib}
|
||||
fi
|
||||
fi
|
||||
)| awk -- '/^[^#]/ {print $2}' | sort -u
|
||||
list_set_files $setname | awk -- '/^[^#]/ {print $2}' | sort -u
|
||||
|
Loading…
Reference in New Issue
Block a user