diff options
| author | Sanjit Bhat <sanjit.bhat@gmail.com> | 2023-09-12 14:08:11 -0400 | 
|---|---|---|
| committer | Sanjit Bhat <sanjit.bhat@gmail.com> | 2023-09-12 14:08:11 -0400 | 
| commit | aa846139f836f4997ef1955bc891a9ec91983b95 (patch) | |
| tree | 15c22d35135cddd32a89bef1a3ebcf423feb72c9 /Makefile | |
| parent | 87de947c747042fe7de95ace74b272a88ff686a8 (diff) | |
| download | xv6-labs-aa846139f836f4997ef1955bc891a9ec91983b95.tar.gz xv6-labs-aa846139f836f4997ef1955bc891a9ec91983b95.tar.bz2 xv6-labs-aa846139f836f4997ef1955bc891a9ec91983b95.zip | |
Makefile: new submission system
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 51 | 
1 files changed, 5 insertions, 46 deletions
| @@ -338,21 +338,10 @@ grade:  	./grade-lab-$(LAB) $(GRADEFLAGS)  ## -## FOR web handin +## FOR submissions  ## - -WEBSUB := https://6828.scripts.mit.edu/2023/handin.py - -handin: tarball-pref myapi.key -	@SUF=$(LAB); \ -	curl -f -F file=@lab-$$SUF-handin.tar.gz -F key=\<myapi.key $(WEBSUB)/upload \ -	    > /dev/null || { \ -		echo ; \ -		echo Submit seems to have failed.; \ -		echo Please go to $(WEBSUB)/ and upload the tarball manually.; } - -handin-check: +submit-check:  	@if ! test -d .git; then \  		echo No .git directory, is this a git repository?; \  		false; \ @@ -374,37 +363,7 @@ handin-check:  		test "$$r" = y; \  	fi -UPSTREAM := $(shell git remote -v | grep -m 1 "xv6-labs-2023" | awk '{split($$0,a," "); print a[1]}') - -tarball: handin-check -	git archive --format=tar HEAD | gzip > lab-$(LAB)-handin.tar.gz - -tarball-pref: handin-check -	@SUF=$(LAB); \ -	git archive --format=tar HEAD > lab-$$SUF-handin.tar; \ -	git diff $(UPSTREAM)/$(LAB) > /tmp/lab-$$SUF-diff.patch; \ -	tar -rf lab-$$SUF-handin.tar /tmp/lab-$$SUF-diff.patch; \ -	gzip -c lab-$$SUF-handin.tar > lab-$$SUF-handin.tar.gz; \ -	rm lab-$$SUF-handin.tar; \ -	rm /tmp/lab-$$SUF-diff.patch; \ - -myapi.key: -	@echo Get an API key for yourself by visiting $(WEBSUB)/ -	@read -p "Please enter your API key: " k; \ -	if test `echo "$$k" |tr -d '\n' |wc -c` = 32 ; then \ -		TF=`mktemp -t tmp.XXXXXX`; \ -		if test "x$$TF" != "x" ; then \ -			echo "$$k" |tr -d '\n' > $$TF; \ -			mv -f $$TF $@; \ -		else \ -			echo mktemp failed; \ -			false; \ -		fi; \ -	else \ -		echo Bad API key: $$k; \ -		echo An API key should be 32 characters long.; \ -		false; \ -	fi; - +zipball: submit-check +	git archive --format=zip --output lab.zip HEAD -.PHONY: handin tarball tarball-pref clean grade handin-check +.PHONY: zipball clean grade submit-check | 
