aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2009-09-02 14:52:44 +0100
committerMax Howell2009-09-02 15:44:10 +0100
commitd78bfe0ed757f585cce5c5dd14f4a9437ddb9bea (patch)
tree675ca767d95bb0e07a6092b84bdd5a5997efe262
parentbb1a6f12bd51577c0ac30285f2b45aab1a91454c (diff)
downloadhomebrew-d78bfe0ed757f585cce5c5dd14f4a9437ddb9bea.tar.bz2
Only time the build, not the download too
-rw-r--r--Library/Homebrew/brew.h.rb3
-rwxr-xr-xbin/brew7
2 files changed, 7 insertions, 3 deletions
diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb
index 124fda318..d688cd937 100644
--- a/Library/Homebrew/brew.h.rb
+++ b/Library/Homebrew/brew.h.rb
@@ -150,16 +150,19 @@ def install f
puts "Type `exit' to return and finalize the installation"
puts "Install to this prefix: #{f.prefix}"
interactive_shell
+ nil
elsif ARGV.include? '--help'
system './configure --help'
exit $?
else
f.prefix.mkpath
+ beginning=Time.now
f.install
%w[README ChangeLog COPYING LICENSE COPYRIGHT AUTHORS].each do |file|
FileUtils.mv "#{file}.txt", file rescue nil
f.prefix.install file rescue nil
end
+ return Time.now-beginning
end
end
end
diff --git a/bin/brew b/bin/brew
index 7769ed68a..d2c0ce148 100755
--- a/bin/brew
+++ b/bin/brew
@@ -99,9 +99,8 @@ begin
require 'keg'
f=ARGV.formulae.shift
raise "#{f.name} is already installed" if f.installed? unless ARGV.force?
- BEGINNING=Time.now
begin
- install f
+ build_time=install f
ohai "Caveats", f.caveats, ''
ohai 'Finishing up'
clean f
@@ -111,7 +110,9 @@ begin
f.prefix.rmtree if f.prefix.directory?
raise
end
- puts "#{f.prefix}: #{f.prefix.abv}, built in #{pretty_duration Time.now-BEGINNING}"
+ print "#{f.prefix}: #{f.prefix.abv}"
+ print ", built in #{pretty_duration build_time}" if build_time
+ puts
when 'ln', 'link'
ARGV.kegs.each {|keg| puts "#{keg.link} links created for #{keg}"}