From 523f50862bf41886688521ae4a3acf68ca0c264b Mon Sep 17 00:00:00 2001 From: Max Howell Date: Tue, 11 Sep 2012 20:57:41 -0400 Subject: [PATCH] Install plists in FormulaInstaller, not build.rb Build rb should only build! --- Library/Homebrew/build.rb | 8 -------- Library/Homebrew/formula_installer.rb | 9 +++++++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb index 77500189bb..f40a7ef340 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 2a3724c195..d4ae876bdc 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