STUID = U201614531
STUNAME = 刘本嵩

# DO NOT modify the following code!!!

GITFLAGS = -q

# prototype: git_commit(msg)
define git_commit_origin
	-@echo Generating HUST commit: "> $(1)"
#	-@git add .. -A --ignore-errors
	-@while (test -e .git/index.lock); do sleep 0.1; done
	-@(echo "> $(1)" && echo $(STUID) && id -un && uname -a && uptime && (head -c 20 /dev/urandom | hexdump -v -e '"%02x"') && echo) | git commit -F - $(GITFLAGS)
	-@sync
endef

define git_commit
	-@echo Recolic helped you to prevent fucking junks!
endef

git_gen:
ifeq ($(M),)
	@echo 'Usage: make git_gen M="Some message"'
	@echo '   or: env M="Some message" make git_gen'
else
	$(call git_commit_origin, "Manual commit: " $(M))
endif

