Add two utility scripts used by syspkg from draga.com CVS:
listpkgs -- a utility script for syspkg maintainers. Given a pkgset name,
list all packages in that pkgset by parsing the src/distrib
set list files. Imported at draga.com revision 1.2.
Usage: ./listpkgs [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
setname set to list packages for
makeplist -- a script called by <bsd.syspkg.mk>. Given a pkgset name
and a pkg name, output a valid PLIST for that package by
parsing the src/distrib set list files. Imported at
draga.com revision 1.2.
Usage: ./makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
-p prefix prefix for created plist
setname pkgname set and package to build plist for
2001-12-26 21:43:00 +03:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2004-07-23 19:11:26 +04:00
|
|
|
# $NetBSD: listpkgs,v 1.9 2004/07/23 15:11:26 erh Exp $
|
2002-02-27 13:43:42 +03:00
|
|
|
#
|
|
|
|
# List all packages in the given pkgset by parsing the list files.
|
Add two utility scripts used by syspkg from draga.com CVS:
listpkgs -- a utility script for syspkg maintainers. Given a pkgset name,
list all packages in that pkgset by parsing the src/distrib
set list files. Imported at draga.com revision 1.2.
Usage: ./listpkgs [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
setname set to list packages for
makeplist -- a script called by <bsd.syspkg.mk>. Given a pkgset name
and a pkg name, output a valid PLIST for that package by
parsing the src/distrib set list files. Imported at
draga.com revision 1.2.
Usage: ./makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
-p prefix prefix for created plist
setname pkgname set and package to build plist for
2001-12-26 21:43:00 +03:00
|
|
|
#
|
|
|
|
|
2004-07-23 19:11:26 +04:00
|
|
|
rundir=${0%/*}
|
|
|
|
. ${rundir}/sets.subr
|
2003-06-23 13:20:55 +04:00
|
|
|
|
2003-12-29 06:13:25 +03:00
|
|
|
prefix=/
|
Add two utility scripts used by syspkg from draga.com CVS:
listpkgs -- a utility script for syspkg maintainers. Given a pkgset name,
list all packages in that pkgset by parsing the src/distrib
set list files. Imported at draga.com revision 1.2.
Usage: ./listpkgs [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
setname set to list packages for
makeplist -- a script called by <bsd.syspkg.mk>. Given a pkgset name
and a pkg name, output a valid PLIST for that package by
parsing the src/distrib set list files. Imported at
draga.com revision 1.2.
Usage: ./makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
-p prefix prefix for created plist
setname pkgname set and package to build plist for
2001-12-26 21:43:00 +03:00
|
|
|
|
2003-12-29 06:13:25 +03:00
|
|
|
usage()
|
|
|
|
{
|
|
|
|
cat 1>&2 <<USAGE
|
|
|
|
Usage: ${0##*/} [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
|
2004-01-03 05:38:58 +03:00
|
|
|
-a arch set arch (e.g, m68k, mips, powerpc) [$MACHINE_ARCH]
|
|
|
|
-m machine set machine (e.g, amiga, i386, macppc) [$MACHINE]
|
2003-12-29 06:13:25 +03:00
|
|
|
-s setsdir directory to find sets [$setsdir]
|
|
|
|
setname set to list packages for
|
|
|
|
USAGE
|
|
|
|
exit 1
|
Add two utility scripts used by syspkg from draga.com CVS:
listpkgs -- a utility script for syspkg maintainers. Given a pkgset name,
list all packages in that pkgset by parsing the src/distrib
set list files. Imported at draga.com revision 1.2.
Usage: ./listpkgs [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
setname set to list packages for
makeplist -- a script called by <bsd.syspkg.mk>. Given a pkgset name
and a pkg name, output a valid PLIST for that package by
parsing the src/distrib set list files. Imported at
draga.com revision 1.2.
Usage: ./makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
-p prefix prefix for created plist
setname pkgname set and package to build plist for
2001-12-26 21:43:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
# handle args
|
2003-12-29 06:13:25 +03:00
|
|
|
while getopts a:m:s: ch; do
|
|
|
|
case ${ch} in
|
|
|
|
a)
|
2004-01-03 05:38:58 +03:00
|
|
|
MACHINE_ARCH=${OPTARG}
|
|
|
|
MACHINE_CPU=$(arch_to_cpu ${OPTARG})
|
Add two utility scripts used by syspkg from draga.com CVS:
listpkgs -- a utility script for syspkg maintainers. Given a pkgset name,
list all packages in that pkgset by parsing the src/distrib
set list files. Imported at draga.com revision 1.2.
Usage: ./listpkgs [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
setname set to list packages for
makeplist -- a script called by <bsd.syspkg.mk>. Given a pkgset name
and a pkg name, output a valid PLIST for that package by
parsing the src/distrib set list files. Imported at
draga.com revision 1.2.
Usage: ./makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
-p prefix prefix for created plist
setname pkgname set and package to build plist for
2001-12-26 21:43:00 +03:00
|
|
|
;;
|
2003-12-29 06:13:25 +03:00
|
|
|
m)
|
2004-01-03 05:38:58 +03:00
|
|
|
MACHINE=${OPTARG}
|
Add two utility scripts used by syspkg from draga.com CVS:
listpkgs -- a utility script for syspkg maintainers. Given a pkgset name,
list all packages in that pkgset by parsing the src/distrib
set list files. Imported at draga.com revision 1.2.
Usage: ./listpkgs [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
setname set to list packages for
makeplist -- a script called by <bsd.syspkg.mk>. Given a pkgset name
and a pkg name, output a valid PLIST for that package by
parsing the src/distrib set list files. Imported at
draga.com revision 1.2.
Usage: ./makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
-p prefix prefix for created plist
setname pkgname set and package to build plist for
2001-12-26 21:43:00 +03:00
|
|
|
;;
|
2003-12-29 06:13:25 +03:00
|
|
|
s)
|
|
|
|
setsdir=${OPTARG}
|
Add two utility scripts used by syspkg from draga.com CVS:
listpkgs -- a utility script for syspkg maintainers. Given a pkgset name,
list all packages in that pkgset by parsing the src/distrib
set list files. Imported at draga.com revision 1.2.
Usage: ./listpkgs [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
setname set to list packages for
makeplist -- a script called by <bsd.syspkg.mk>. Given a pkgset name
and a pkg name, output a valid PLIST for that package by
parsing the src/distrib set list files. Imported at
draga.com revision 1.2.
Usage: ./makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
-p prefix prefix for created plist
setname pkgname set and package to build plist for
2001-12-26 21:43:00 +03:00
|
|
|
;;
|
|
|
|
*)
|
2003-12-29 06:13:25 +03:00
|
|
|
usage
|
Add two utility scripts used by syspkg from draga.com CVS:
listpkgs -- a utility script for syspkg maintainers. Given a pkgset name,
list all packages in that pkgset by parsing the src/distrib
set list files. Imported at draga.com revision 1.2.
Usage: ./listpkgs [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
setname set to list packages for
makeplist -- a script called by <bsd.syspkg.mk>. Given a pkgset name
and a pkg name, output a valid PLIST for that package by
parsing the src/distrib set list files. Imported at
draga.com revision 1.2.
Usage: ./makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
-p prefix prefix for created plist
setname pkgname set and package to build plist for
2001-12-26 21:43:00 +03:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
2003-12-29 06:13:25 +03:00
|
|
|
shift $((${OPTIND} - 1))
|
|
|
|
if [ $# -ne 1 ]; then
|
Add two utility scripts used by syspkg from draga.com CVS:
listpkgs -- a utility script for syspkg maintainers. Given a pkgset name,
list all packages in that pkgset by parsing the src/distrib
set list files. Imported at draga.com revision 1.2.
Usage: ./listpkgs [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
setname set to list packages for
makeplist -- a script called by <bsd.syspkg.mk>. Given a pkgset name
and a pkg name, output a valid PLIST for that package by
parsing the src/distrib set list files. Imported at
draga.com revision 1.2.
Usage: ./makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
-p prefix prefix for created plist
setname pkgname set and package to build plist for
2001-12-26 21:43:00 +03:00
|
|
|
usage
|
|
|
|
fi
|
2003-12-29 06:13:25 +03:00
|
|
|
setname="$1"
|
Add two utility scripts used by syspkg from draga.com CVS:
listpkgs -- a utility script for syspkg maintainers. Given a pkgset name,
list all packages in that pkgset by parsing the src/distrib
set list files. Imported at draga.com revision 1.2.
Usage: ./listpkgs [-a arch] [-m machine] [-s setsdir] [-p prefix] setname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
setname set to list packages for
makeplist -- a script called by <bsd.syspkg.mk>. Given a pkgset name
and a pkg name, output a valid PLIST for that package by
parsing the src/distrib set list files. Imported at
draga.com revision 1.2.
Usage: ./makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname
-a arch set arch (e.g, m68k, mips, powerpc)
-m machine set machine (e.g, amiga, i386, macppc)
-s setsdir directory to find sets
-p prefix prefix for created plist
setname pkgname set and package to build plist for
2001-12-26 21:43:00 +03:00
|
|
|
|
2003-12-29 06:13:25 +03:00
|
|
|
list_set_files $setname | awk '{print $2}' | sort -u
|