Commit d760ca9 Cody Cutler
committed
1 parent 877431d commit d760ca9 Copy full SHA for d760ca9
File tree 1 file changed +18
-2
lines changed
1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,9 @@ git-handin: handin-check
222
222
WEBSUB = https://ccutler.scripts.mit.edu/6.828/handin.py
223
223
224
224
handin : tarball-pref myapi.key
225
- @curl -f -F file=@lab$(LAB ) -handin.tar.gz -F key=\< myapi.key $(WEBSUB ) /upload \
225
+ @SUF=$(LAB ) ; \
226
+ test -f .suf && SUF=` cat .suf` ; \
227
+ curl -f -F file=@lab$$ SUF-handin.tar.gz -F key=\< myapi.key $(WEBSUB ) /upload \
226
228
> /dev/null || { \
227
229
echo ; \
228
230
echo Submit seems to have failed.; \
@@ -254,7 +256,21 @@ tarball: handin-check
254
256
git archive --format=tar HEAD | gzip > lab$(LAB ) -handin.tar.gz
255
257
256
258
tarball-pref : handin-check
257
- git archive --prefix=lab$(LAB ) / --format=tar HEAD | gzip > lab$(LAB ) -handin.tar.gz
259
+ @SUF=$(LAB ) ; \
260
+ if test $( LAB) -eq 3 -o $( LAB) -eq 4; then \
261
+ read -p " Which part would you like to submit? [a, b, c (lab 4 only)]" p; \
262
+ if test " $$ p" ! = a -a " $$ p" ! = b; then \
263
+ if test ! $( LAB) -eq 4 -o ! " $$ p" = c; then \
264
+ echo " Bad part \" $$ p\" " ; \
265
+ exit 1; \
266
+ fi ; \
267
+ fi ; \
268
+ SUF=" $( LAB) $$ p" ; \
269
+ echo $$ SUF > .suf; \
270
+ else \
271
+ rm -f .suf; \
272
+ fi ; \
273
+ git archive --prefix=lab$(LAB ) / --format=tar HEAD | gzip > lab$$ SUF-handin.tar.gz
258
274
259
275
myapi.key :
260
276
@echo Get an API key for yourself by visiting $(WEBSUB )
You can’t perform that action at this time.
0 commit comments