Browse Source

calculateAndSubmit check server response

adaptedStrategy0
kaos 9 years ago
parent
commit
21a16474c8
1 changed files with 7 additions and 5 deletions
  1. +7
    -5
      calculateAndSubmit

+ 7
- 5
calculateAndSubmit View File

@ -9,12 +9,14 @@ if [ $? -eq 0 ]; then
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "submitting solution"
exit 1
curl --user :2aaFCkjNIDHAsAIh9iQHc+Y+FGhkM5Z0RQgpO6TL6EA= -X POST -H "Content-Type: application/json" \
-d $OUTPUT \
https://davar.icfpcontest.org/teams/235/solutions
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 "error with server"
fi
else
echo "abort submission"
echo "submission aborted"
fi
else
echo "error in vm execution"


Loading…
Cancel
Save