run:
@$(MAKE) check; rc=$$?; \
if [ $$rc -eq 0 ]; then \
- echo "[run] check rc=0, go to commitinfo.sh..."; \
- $(MAKE) $(commitinfo.sh); \
- echo "[run] commitinfo.sh exit 0. Go to checksums.sh..."; \
- $(MAKE) checksums; \
- echo "[run] checksums.sh exit 0. Do git add commit and push..."; \
- git add .; \
- git commit -m '$(COMM_INFO)'; \
- git push; \
+ echo "[run] check $$rc, go to commitinfo.sh..."; \
+ @$(MAKE) $(commitinfo.sh); ci=$$?; \
+ if [ $$ci -eq 0 ]; then \
+ echo "[run] commitinfo.sh exit $$ci. Go to checksums.sh..."; \
+ @$(MAKE) checksums; cs=$$?; \
+ if [ $$cs -eq 0 ]; then \
+ echo "[run] checksums.sh exit $$rc. Do git add commit and push..."; \
+ git add .; \
+ git commit -m '$(COMM_INFO)'; \
+ git push; \
+ else \
+ $(MAKE) notify "[run] checksums.sh exit $$cs, check it!"; \
+ else \
+ $(MAKE) notify "[run] commitinfo.sh exit $$ci, check it!"; \
else \
- echo "[run] check rc=$$rc, stop"; \
+ echo "[run] check exit $$rc, repo is clean exit Ok."; \
fi
@echo "[run] done"