9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/crash_analysis.rb', line 9
def self.run()
puts "input logs_dir_path: "
logs_dir_path = gets.chomp
if logs_dir_path.empty? || logs_dir_path.nil? || !File.directory?(logs_dir_path)
puts "invalid logs_dir_path"
return
end
puts "input log_file_suffix(log, crash, txt etc.): "
log_file_suffix = gets.chomp
if log_file_suffix.empty? || log_file_suffix.nil?
puts "invalid log_file_suffix"
return
end
puts "init settings..."
output = []
r, io = IO.pipe
fork do
system("find /Applications/Xcode.app -name symbolicatecrash -type f", out: io, err: :out)
end
io.close
r.each_line{|l| puts l; output << l.chomp}
symbolicatecrash_path = output[0]
puts "running..."
analysis = Analysis.new()
analysis.run(logs_dir_path, log_file_suffix, symbolicatecrash_path)
end
|