aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2010-04-07 16:45:31 -0700
committerAdam Vandenberg2010-04-22 10:41:40 -0700
commit54b5a7afbb7d562c3ee3adf607d6067cd6b7d2dc (patch)
tree6404de28f6d1ad4bf65adbb5278f0b1f57b26ee0 /Library
parent0f7b3bd408cd3dfdf2db61f5b3dc0f24265164fe (diff)
downloadbrew-54b5a7afbb7d562c3ee3adf607d6067cd6b7d2dc.tar.bz2
Add --git option to 'brew install -i'.
This allows for easy generation of diffs, per a trick in http://wiki.github.com/mxcl/homebrew/formula-cookbook
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Homebrew/install.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/install.rb b/Library/Homebrew/install.rb
index e16e4dd77..8a6836bd1 100755
--- a/Library/Homebrew/install.rb
+++ b/Library/Homebrew/install.rb
@@ -78,6 +78,15 @@ def install f
ohai "Entering interactive mode"
puts "Type `exit' to return and finalize the installation"
puts "Install to this prefix: #{f.prefix}"
+
+ if ARGV.flag? '--git'
+ system "git init"
+ system "git add -A"
+ puts "This folder is now a git repo. Make your changes and then use:"
+ puts " git diff | pbcopy"
+ puts "to copy the diff to the clipboard."
+ end
+
interactive_shell
nil
elsif ARGV.include? '--help'