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.

23 lines
624 B

#!/bin/bash
if [ $# -lt 1 ]; then
echo "missing json filename"
exit 1
fi
OUTPUT=`dist/build/icfp2015/icfp2015 -f $1|./filterResults.py|sed -e 's/ //g'`
if [ $? -eq 0 ]; then
read -p "Are you sure? [y/n]" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
response=`curl --user :2aaFCkjNIDHAsAIh9iQHc+Y+FGhkM5Z0RQgpO6TL6EA= -X POST -H "Content-Type: application/json" -d $OUTPUT https://davar.icfpcontest.org/teams/235/solutions`
if [ "$response" == "created" ]; then
echo "submitted"
else
echo $response
echo "error with server"
fi
else
echo "submission aborted"
fi
else
echo "error in vm execution"
fi