Force creation of locale-specific man directories

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Jack Nagel 2012-01-04 20:50:19 -06:00
parent 6858c00feb
commit 97fa28248d

View File

@ -56,6 +56,8 @@ class Keg < Pathname
$d=0 $d=0
share_mkpaths=%w[aclocal doc info locale man]+(1..8).collect{|x|"man/man#{x}"} share_mkpaths=%w[aclocal doc info locale man]+(1..8).collect{|x|"man/man#{x}"}
# cat pages are rare, but exist so the directories should be created
share_mkpaths << (1..8).collect{ |x| "man/cat#{x}" }
# yeah indeed, you have to force anything you need in the main tree into # yeah indeed, you have to force anything you need in the main tree into
# these dirs REMEMBER that *NOT* everything needs to be in the main tree # these dirs REMEMBER that *NOT* everything needs to be in the main tree
@ -63,7 +65,16 @@ class Keg < Pathname
link_dir('bin') {:skip} link_dir('bin') {:skip}
link_dir('sbin') {:link} link_dir('sbin') {:link}
link_dir('include') {:link} link_dir('include') {:link}
link_dir('share') {|path| :mkpath if share_mkpaths.include? path.to_s}
link_dir('share') do |path|
# locale-specific directories have the form
# language[_territory][.codeset][@modifier]
if path.to_s =~ /man\/([a-z]{2}|C|POSIX)(_[A-Z]{2})?(\.[a-zA-Z\-0-9]+(@.+)?)?/
:mkpath
elsif share_mkpaths.include? path.to_s
:mkpath
end
end
link_dir('lib') do |path| link_dir('lib') do |path|
case path.to_s case path.to_s