You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
900 B
42 lines
900 B
4 months ago
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
DIR=$(mktemp -d out/perfetto.XXXXXX)
|
||
|
|
||
|
function cleanup {
|
||
|
rm -rf "$DIR"
|
||
|
echo "Deleted temp working directory $DIR"
|
||
|
}
|
||
|
|
||
|
#trap cleanup EXIT
|
||
|
|
||
|
function is_mac {
|
||
|
! test -d /proc
|
||
|
return $?
|
||
|
}
|
||
|
|
||
|
tools/gn gen $DIR --args='is_clang=true is_debug=false'
|
||
|
tools/ninja -C $DIR trace_processor_shell
|
||
|
|
||
|
if is_mac; then
|
||
|
platform=mac
|
||
|
else
|
||
|
platform=linux
|
||
|
strip $DIR/trace_processor_shell
|
||
|
fi
|
||
|
|
||
|
if which shasum; then
|
||
|
NEW_SHA=$(shasum $DIR/trace_processor_shell | cut -f1 -d' ') # Mac OS
|
||
|
else
|
||
|
NEW_SHA=$(sha1sum $DIR/trace_processor_shell | cut -f1 -d' ') # Linux
|
||
|
fi
|
||
|
|
||
|
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"
|