aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_installer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/formula_installer.rb')
-rw-r--r--Library/Homebrew/formula_installer.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 3738c3784..652f87ae3 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -259,6 +259,12 @@ class FormulaInstaller
compute_and_install_dependencies if not_pouring && !ignore_deps?
build
clean
+
+ # Store the formula used to build the keg in the keg.
+ s = formula.path.read.gsub(/ bottle do.+?end\n\n?/m, "")
+ brew_prefix = formula.prefix/".brew"
+ brew_prefix.mkdir
+ Pathname(brew_prefix/"#{formula.name}.rb").atomic_write(s)
end
build_bottle_postinstall if build_bottle?