diff --git a/calculateAndSubmit b/calculateAndSubmit index e853ccf..303c0e3 100755 --- a/calculateAndSubmit +++ b/calculateAndSubmit @@ -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"