Commit dbbd736b by Enrico Pozzobon

upload script

parent 7c967ca5
#!/bin/bash
i=$1
if [[ -z $AUTH_HEADER ]]; then
echo "Please provide \$AUTH_HEADER";
exit;
fi
if [[ -z $i ]]; then
echo "Please provide index of result to send"
fi
echo "Fetching result $i...";
curl "http://localhost:5002/results/$i/results.json" -f -o result.json || {
curl "http://localhost:5002/restart_test/$i"
exit;
}
echo "Sending results $i...";
curl 'https://lwc.las3.de/admin/insert-result.php' \
-f -H "$AUTH_HEADER" \
--data "$(cat result.json)" || exit
echo "Sent.";
curl "http://localhost:5002/delete_test/$i"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment