This commit is contained in:
Upamanyu Sharma 2023-02-07 20:36:42 -05:00
parent c53e90bcdc
commit 2c97008e3e

View file

@ -22,20 +22,8 @@ LABS=" lab1 lab2a lab2b lab2c lab2d lab3a lab3b lab4a lab4b "
"--exclude=src/main/mrworker" \
"--exclude=*.so" \
Makefile src; \
if ! test -e api.key ; then \
echo "Missing $(PWD)/api.key. Please create the file with your key in it or submit the $@-handin.tar.gz via the web interface."; \
else \
echo "Are you sure you want to submit $@? Enter 'yes' to continue:"; \
read line; \
if test "$$line" != "yes" ; then echo "Giving up submission"; exit; fi; \
if test `stat -c "%s" "$@-handin.tar.gz" 2>/dev/null || stat -f "%z" "$@-handin.tar.gz"` -ge 20971520 ; then echo "File exceeds 20MB."; exit; fi; \
cat api.key | tr -d '\n' > .api.key.trimmed ; \
curl --silent --fail --show-error -F file=@$@-handin.tar.gz -F "key=<.api.key.trimmed" \
https://6824.scripts.mit.edu/2023/handin.py/upload > /dev/null || { \
echo ; \
echo "Submit seems to have failed."; \
echo "Please upload the tarball manually on the submission website."; } \
fi; \
if test `stat -c "%s" "$@-handin.tar.gz" 2>/dev/null || stat -f "%z" "$@-handin.tar.gz"` -ge 20971520 ; then echo "File exceeds 20MB."; rm $@-handin.tar.gz; exit; fi; \
echo "$@-handin.tar.gz successfully created. Please upload the tarball manually on Gradescope."; \
else \
echo "Bad target $@. Usage: make [$(LABS)]"; \
fi