Link binaries in sbin as well as bin.

Signed-off-by: Max Howell <max@methylblue.com>
This commit is contained in:
Adeel Ahmad Khan 2009-08-12 09:43:16 +08:00 committed by Max Howell
parent 140bfc5592
commit 1c55642645
3 changed files with 4 additions and 2 deletions

View File

@ -160,7 +160,7 @@ def prune
$d=0 $d=0
dirs=Array.new dirs=Array.new
paths=%w[bin etc lib include share].collect {|d| HOMEBREW_PREFIX+d} paths=%w[bin sbin etc lib include share].collect {|d| HOMEBREW_PREFIX+d}
paths.each do |path| paths.each do |path|
path.find do |path| path.find do |path|
@ -213,7 +213,7 @@ class Cleaner
share=f.prefix+'share' share=f.prefix+'share'
(f.prefix+'man').mv share rescue nil (f.prefix+'man').mv share rescue nil
[f.bin, f.lib].each {|d| clean_dir d} [f.bin, f.sbin, f.lib].each {|d| clean_dir d}
# you can read all of this shit online nowadays, save the space # you can read all of this shit online nowadays, save the space
# info pages are shit, everyone agrees apart from Richard Stallman # info pages are shit, everyone agrees apart from Richard Stallman

View File

@ -63,6 +63,7 @@ class AbstractFormula
attr_reader :url, :version, :url, :homepage, :name attr_reader :url, :version, :url, :homepage, :name
def bin; prefix+'bin' end def bin; prefix+'bin' end
def sbin; prefix+'sbin' end
def doc; prefix+'share'+'doc'+name end def doc; prefix+'share'+'doc'+name end
def lib; prefix+'lib' end def lib; prefix+'lib' end
def man; prefix+'share'+'man' end def man; prefix+'share'+'man' end

View File

@ -38,6 +38,7 @@ class Keg <Pathname
# 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
link_dir('etc') {:mkpath} link_dir('etc') {:mkpath}
link_dir('bin') {:link} link_dir('bin') {:link}
link_dir('sbin') {:link}
link_dir('lib') {|path| :mkpath if %w[pkgconfig php perl5].include? path.to_s} link_dir('lib') {|path| :mkpath if %w[pkgconfig php perl5].include? path.to_s}
link_dir('include') {:link} link_dir('include') {:link}
link_dir('share') {|path| :mkpath if mkpaths.include? path.to_s} link_dir('share') {|path| :mkpath if mkpaths.include? path.to_s}