diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2010-10-19 07:29:42 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2010-10-19 07:29:42 +0000 |
commit | ad032780ca155e1622297ac9e956a4577ec77576 (patch) | |
tree | 25bd87ee85de46656cf6a0c3a9db83b8769d3ee8 | |
parent | a129dfe93666afc1a35b53d313e4d9cd7c8d3a31 (diff) |
before running groff, create dir when needed.
fixes tcl and the few ports with non-standard man locations that can't
rely on mtree fake.
as noticed by brad@
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index 801a3f60ddf..cef7bc15bcf 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackingElement.pm,v 1.183 2010/08/03 14:07:27 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.184 2010/10/19 07:29:41 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org> # @@ -478,6 +478,7 @@ sub keyword() { "shell" } __PACKAGE__->register_with_factory; package OpenBSD::PackingElement::Manpage; +use File::Basename; our @ISA=qw(OpenBSD::PackingElement::FileBase); sub keyword() { "man" } @@ -528,6 +529,10 @@ sub format } } open my $oldout, '>&STDOUT'; + my $dir = dirname("$base/$out"); + unless (-d $dir) { + mkdir($dir); + } open STDOUT, '>', "$base/$out" or die "Can't write to $base/$out"; system(OpenBSD::Paths->groff, '-Tascii', '-mandoc', '-Wall', '-mtty-char', @extra, '--', $fname); |