lib/autobuild/subcommand.rb in autobuild-1.12.3 vs lib/autobuild/subcommand.rb in autobuild-1.13.0.pre1

- old
+ new

@@ -79,11 +79,11 @@ # Returns the number of CPUs present on this system def self.autodetect_processor_count if @processor_count return @processor_count end - + if File.file?('/proc/cpuinfo') cpuinfo = File.readlines('/proc/cpuinfo') physical_ids, core_count, processor_ids = [], [], [] cpuinfo.each do |line| case line @@ -250,13 +250,13 @@ logname = File.join(logdir, "#{target_name.gsub(/[:]/,'_')}-#{phase.to_s.gsub(/[:]/,'_')}.log") if !File.directory?(File.dirname(logname)) FileUtils.mkdir_p File.dirname(logname) end - if Autobuild.verbose - Autobuild.message "#{target_name}: running #{command.join(" ")}\n (output goes to #{logname})" - end + if Autobuild.verbose + Autobuild.message "#{target_name}: running #{command.join(" ")}\n (output goes to #{logname})" + end open_flag = if Autobuild.keep_oldlogs then 'a' elsif Autobuild.registered_logfile?(logname) then 'a' else 'w' end @@ -279,19 +279,19 @@ logfile.puts end logfile.puts logfile.puts "#{Time.now}: running" logfile.puts " #{command.join(" ")}" - logfile.puts "with environment:" + logfile.puts "with environment:" env.keys.sort.each do |key| if value = env[key] logfile.puts " '#{key}'='#{value}'" end end logfile.puts logfile.puts "#{Time.now}: running" logfile.puts " #{command.join(" ")}" - logfile.flush + logfile.flush logfile.sync = true if !input_streams.empty? pread, pwrite = IO.pipe # to feed subprocess stdin end