aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMax Howell2009-11-12 03:55:09 +0000
committerMax Howell2009-12-07 18:20:04 +0000
commitb2fd885493e38318d28bd495c27edacdef0c2caf (patch)
treec686357261ca3807ce70bcc80093fc9b53ebe3df /bin
parent5969700ef7c3a24724e5cf63686e79ee61f750f9 (diff)
downloadhomebrew-b2fd885493e38318d28bd495c27edacdef0c2caf.tar.bz2
Brew update will git init if required
This is necessary for those who installed Homebrew using the suggested tarball method. Too late for them though.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/brew b/bin/brew
index ed7a5124e..3bb11b385 100755
--- a/bin/brew
+++ b/bin/brew
@@ -132,7 +132,8 @@ begin
exec_editor *paths
end
- when 'up', 'update'
+ when 'up', 'update'
+ if system "/usr/bin/which -s git"
require 'update'
updater = RefreshBrew.new
old_revision = updater.current_revision
@@ -147,6 +148,9 @@ begin
puts "No formulae were updated." unless updater.pending_formulae_changes?
end
end
+ else
+ abort "Please `brew install git' first."
+ end
when 'ln', 'link'
ARGV.kegs.each {|keg| puts "#{keg.link} links created for #{keg}"}