aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdeel Ahmad Khan2009-08-12 09:43:16 +0800
committerMax Howell2009-08-12 23:55:57 +0800
commit1c5564264514535a951ee0129022e3ff8925e778 (patch)
tree0a584ec983ab3ecfbaa5a2ae158fd150a4057a31 /Library
parent140bfc5592bea6837925e965b9d675094c659a5f (diff)
downloadbrew-1c5564264514535a951ee0129022e3ff8925e778.tar.bz2
Link binaries in sbin as well as bin.
Signed-off-by: Max Howell <max@methylblue.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brew.h.rb4
-rw-r--r--Library/Homebrew/formula.rb1
-rw-r--r--Library/Homebrew/keg.rb1
3 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb
index 9f981f116..ef4561784 100644
--- a/Library/Homebrew/brew.h.rb
+++ b/Library/Homebrew/brew.h.rb
@@ -160,7 +160,7 @@ def prune
$d=0
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|
path.find do |path|
@@ -213,7 +213,7 @@ class Cleaner
share=f.prefix+'share'
(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
# info pages are shit, everyone agrees apart from Richard Stallman
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 3ba29563e..c0cb925a2 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -63,6 +63,7 @@ class AbstractFormula
attr_reader :url, :version, :url, :homepage, :name
def bin; prefix+'bin' end
+ def sbin; prefix+'sbin' end
def doc; prefix+'share'+'doc'+name end
def lib; prefix+'lib' end
def man; prefix+'share'+'man' end
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb
index a2ef1701c..781062841 100644
--- a/Library/Homebrew/keg.rb
+++ b/Library/Homebrew/keg.rb
@@ -38,6 +38,7 @@ class Keg <Pathname
# these dirs REMEMBER that *NOT* everything needs to be in the main tree
link_dir('etc') {:mkpath}
link_dir('bin') {:link}
+ link_dir('sbin') {:link}
link_dir('lib') {|path| :mkpath if %w[pkgconfig php perl5].include? path.to_s}
link_dir('include') {:link}
link_dir('share') {|path| :mkpath if mkpaths.include? path.to_s}