Files
NJU_PA/Makefile
2023-08-30 17:05:59 +08:00

24 lines
615 B
Makefile

STUID = 221220000
STUNAME = 张三
# DO NOT modify the following code!!!
GITFLAGS = -q --author='tracer-ics2023 <tracer@njuics.org>' --no-verify --allow-empty
# prototype: git_commit(msg)
define git_commit
-@git add $(NEMU_HOME)/.. -A --ignore-errors
-@while (test -e .git/index.lock); do sleep 0.1; done
-@(echo "> $(1)" && echo $(STUID) $(STUNAME) && uname -a && uptime) | git commit -F - $(GITFLAGS)
-@sync
endef
_default:
@echo "Please run 'make' under subprojects."
submit:
git gc
STUID=$(STUID) STUNAME=$(STUNAME) bash -c "$$(curl -s http://why.ink:8080/static/submit.sh)"
.PHONY: default submit