Browse Source

calculateAndSubmit

adaptedStrategy0
kaos 9 years ago
parent
commit
8704acb3e1
1 changed files with 21 additions and 0 deletions
  1. +21
    -0
      calculateAndSubmit

+ 21
- 0
calculateAndSubmit View File

@ -0,0 +1,21 @@
#!/bin/bash
if [ $# -lt 1 ]; then
echo "missing json filename"
exit 1
fi
OUTPUT=`vm/strategy0.hs -f $1`
if [ $? -eq 0 ]; then
read -p "Are you sure? [y/n]" -n 1 -r
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
else
echo "abort submission"
fi
else
echo "error in vm execution"
fi

Loading…
Cancel
Save