aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2012-09-11 20:57:41 -0400
committerMax Howell2012-09-13 17:00:02 -0400
commit523f50862bf41886688521ae4a3acf68ca0c264b (patch)
tree3cd5cf440592f651e4ad3b073b6463b93e2318a9 /Library
parentfe295faffebd1449bca076ef54c8b61a7fb136ed (diff)
downloadbrew-523f50862bf41886688521ae4a3acf68ca0c264b.tar.bz2
Install plists in FormulaInstaller, not build.rb
Build rb should only build!
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Homebrew/build.rb8
-rw-r--r--Library/Homebrew/formula_installer.rb9
2 files changed, 9 insertions, 8 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb
index 77500189b..f40a7ef34 100755
--- a/Library/Homebrew/build.rb
+++ b/Library/Homebrew/build.rb
@@ -146,14 +146,6 @@ def install f
f.prefix.mkpath
f.install
- # Install a plist if one is defined
- unless f.startup_plist.nil?
- unless f.plist_path.exist?
- f.plist_path.write f.startup_plist
- f.plist_path.chmod 0644
- end
- end
-
# Find and link metafiles
FORMULA_META_FILES.each do |filename|
next if File.directory? filename
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 2a3724c19..d4ae876bd 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -186,6 +186,7 @@ class FormulaInstaller
check_PATH unless f.keg_only?
end
+ install_plist
fix_install_names
ohai "Summary" if ARGV.verbose? or show_summary_heading
@@ -283,6 +284,14 @@ class FormulaInstaller
end
end
+ def install_plist
+ # Install a plist if one is defined
+ if f.startup_plist and not f.plist_path.exist?
+ f.plist_path.write f.startup_plist
+ f.plist_path.chmod 0644
+ end
+ end
+
def fix_install_names
Keg.new(f.prefix).fix_install_names
rescue Exception => e