| DIR=$(mktemp -d out/perfetto.XXXXXX) |
| echo "Deleted temp working directory $DIR" |
| tools/gn gen $DIR --args='is_clang=true is_debug=false' |
| tools/ninja -C $DIR trace_processor_shell |
| NEW_SHA=$(shasum $DIR/trace_processor_shell | cut -f1 -d' ') # Mac OS |
| NEW_SHA=$(sha1sum $DIR/trace_processor_shell | cut -f1 -d' ') # Linux |
| name=trace_processor_shell-$platform-$NEW_SHA |
| gsutil cp $DIR/trace_processor_shell gs://perfetto/$name |
| gsutil acl ch -u AllUsers:R gs://perfetto/$name |
| echo 'Now run the following command to update tools/trace_processor:' |
| echo "sed \"s/'$platform': '[^']*',/'$platform': '$NEW_SHA',/\" --in-place tools/trace_processor" |