diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-09-16 07:46:01 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-09-16 07:46:01 +0000 |
commit | c6936297726ad8321025beaf1e14e995c02f4d2d (patch) | |
tree | f7b1da1d9262191f55af0f6f321ff53300790f88 | |
parent | c98bdf7ae314b61387e829186877a34536a9a9e2 (diff) |
Add LibraryOnly routine to check on @lib files.
Forgot to add shell to the list of files...
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingList.pm | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm index 54b6db2d42f..f6f26f48359 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingList.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingList.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackingList.pm,v 1.22 2004/09/14 22:28:23 espie Exp $ +# $OpenBSD: PackingList.pm,v 1.23 2004/09/16 07:46:00 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -70,12 +70,23 @@ sub DirrmOnly } } +sub LibraryOnly +{ + my ($fh, $cont) = @_; + local $_; + while (<$fh>) { + next unless m/^\@(?:cwd|lib|name)\b/ || + m/^\@comment\s+subdir\=/; + &$cont($_); + } +} + sub FilesOnly { my ($fh, $cont) = @_; local $_; while (<$fh>) { - next unless m/^\@(?:cwd|name|info|man|file|lib)\b/ || !m/^\@/; + next unless m/^\@(?:cwd|name|info|man|file|lib|shell)\b/ || !m/^\@/; &$cont($_); } } |