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
commit4254661c66a3567cb098f9f92ec1bc1d301c1503 (patch)
tree1a34d8a2f71d8c049284c4a293c58b560b31fbaf /bin
parent19039471c0ae20886f1ca109e364fc4ac2da678e (diff)
downloadbrew-4254661c66a3567cb098f9f92ec1bc1d301c1503.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}"}