This repository has been archived on 2023-02-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-my-data/examples/example.sh

17 lines
530 B
Bash
Executable File

#!/bin/bash
# Get an auth token fron http://mydata.local:8003/api/token and use it to submit benchmarks.
# You only can get a token if you have a valid login session in your browser
# run it as follows `example.sh path-to-benchmark your-token`
JSON_FNAME="$1"; shift
AUTH_TOKEN="$1"; shift
curl_opts=(
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer $AUTH_TOKEN"
--data-binary "@${JSON_FNAME}"
)
curl "${curl_opts[@]}" "$@" http://mydata.local:8003/benchmarks/submit