| 1 |
results = [] |
| 2 |
|
| 3 |
cmd = "|build/Release/ChipmunkDemo.app/Contents/MacOS/ChipmunkDemo -bench -trial" |
| 4 |
open(cmd) do|io| |
| 5 |
while str = io.gets do |
| 6 |
puts str |
| 7 |
results << str.split[2] |
| 8 |
end |
| 9 |
end |
| 10 |
|
| 11 |
puts "Placing results in paste buffer." |
| 12 |
open("|pbcopy", "w"){|io| io.puts results} |