diff --git a/scripts/pprof-post.sh b/scripts/pprof-post.sh index 0dcee107f121..e70f850c759b 100755 --- a/scripts/pprof-post.sh +++ b/scripts/pprof-post.sh @@ -1,11 +1,9 @@ #!/usr/bin/env bash set -euo pipefail -# Usage: $0 "optional description, defaults to current date" < somefile.pb.gz -out=$(curl -s 'https://api.polarsignals.com/api/share/v1/profiles' \ - -X POST \ - -F "description=${1-$(date -u)}" \ - -F "profile=@-") -echo -n "https://share.polarsignals.com/" -grep -Eo '[0-9a-f]{4,}' <<< "${out}" - +if ! which pprofme; then + echo "pprofme missing, setup instructions: https://github.com/polarsignals/pprofme#install" + exit 1 +fi + +pprofme upload "$@"