Only time the build, not the download too
This commit is contained in:
parent
6006c51804
commit
4f8c46d627
@ -150,16 +150,19 @@ def install f
|
|||||||
puts "Type `exit' to return and finalize the installation"
|
puts "Type `exit' to return and finalize the installation"
|
||||||
puts "Install to this prefix: #{f.prefix}"
|
puts "Install to this prefix: #{f.prefix}"
|
||||||
interactive_shell
|
interactive_shell
|
||||||
|
nil
|
||||||
elsif ARGV.include? '--help'
|
elsif ARGV.include? '--help'
|
||||||
system './configure --help'
|
system './configure --help'
|
||||||
exit $?
|
exit $?
|
||||||
else
|
else
|
||||||
f.prefix.mkpath
|
f.prefix.mkpath
|
||||||
|
beginning=Time.now
|
||||||
f.install
|
f.install
|
||||||
%w[README ChangeLog COPYING LICENSE COPYRIGHT AUTHORS].each do |file|
|
%w[README ChangeLog COPYING LICENSE COPYRIGHT AUTHORS].each do |file|
|
||||||
FileUtils.mv "#{file}.txt", file rescue nil
|
FileUtils.mv "#{file}.txt", file rescue nil
|
||||||
f.prefix.install file rescue nil
|
f.prefix.install file rescue nil
|
||||||
end
|
end
|
||||||
|
return Time.now-beginning
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
7
bin/brew
7
bin/brew
@ -99,9 +99,8 @@ begin
|
|||||||
require 'keg'
|
require 'keg'
|
||||||
f=ARGV.formulae.shift
|
f=ARGV.formulae.shift
|
||||||
raise "#{f.name} is already installed" if f.installed? unless ARGV.force?
|
raise "#{f.name} is already installed" if f.installed? unless ARGV.force?
|
||||||
BEGINNING=Time.now
|
|
||||||
begin
|
begin
|
||||||
install f
|
build_time=install f
|
||||||
ohai "Caveats", f.caveats, ''
|
ohai "Caveats", f.caveats, ''
|
||||||
ohai 'Finishing up'
|
ohai 'Finishing up'
|
||||||
clean f
|
clean f
|
||||||
@ -111,7 +110,9 @@ begin
|
|||||||
f.prefix.rmtree if f.prefix.directory?
|
f.prefix.rmtree if f.prefix.directory?
|
||||||
raise
|
raise
|
||||||
end
|
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'
|
when 'ln', 'link'
|
||||||
ARGV.kegs.each {|keg| puts "#{keg.link} links created for #{keg}"}
|
ARGV.kegs.each {|keg| puts "#{keg.link} links created for #{keg}"}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user