diff options
| author | Jack Nagel | 2012-01-04 20:50:19 -0600 |
|---|---|---|
| committer | Jack Nagel | 2012-01-04 20:50:19 -0600 |
| commit | 97fa28248d70e3b2b51d270ec3f4dcb7aca57f02 (patch) | |
| tree | 806e89e3d5a32ae1cf9dcb65763f99d02c5d7135 | |
| parent | 6858c00febc4d326f654eb0d6b89fd0083b01ddf (diff) | |
| download | brew-97fa28248d70e3b2b51d270ec3f4dcb7aca57f02.tar.bz2 | |
Force creation of locale-specific man directories
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
| -rw-r--r-- | Library/Homebrew/keg.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index 0f1ce70fe..e0bbc94f0 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -56,6 +56,8 @@ class Keg < Pathname $d=0 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 # 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('sbin') {: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| case path.to_s |
