tunuifranken.info/Makefile

43 lines
1 KiB
Makefile
Raw Normal View History

2021-03-12 12:23:00 +01:00
VERBOSE=false
export VERBOSE
2021-02-22 13:00:08 +01:00
unpushed=$(shell git log --pretty=format:'%h' @{u}.. | wc -c)
2021-02-22 11:48:24 +01:00
all: lime2test cours procedures cv index
lime2test:
@[ "${HOSTNAME}" != lime2 ]
cours: lime2test
2021-03-05 16:18:59 +01:00
@./bin/pull-cours.sh
2021-02-22 11:48:24 +01:00
procedures: lime2test header.html footer.html procedures/index.template.html
2021-03-05 16:18:59 +01:00
@./bin/pull-procedures.sh
2021-02-22 11:48:24 +01:00
cv: lime2test
2021-03-05 16:18:59 +01:00
@./bin/pull-cv.sh
2021-02-22 11:48:24 +01:00
index: lime2test header.html footer.html index.template.html
2021-03-05 16:18:59 +01:00
@./bin/create-index.sh
2021-02-22 11:48:24 +01:00
serve:
@python -m http.server
upload:
2021-02-22 13:00:08 +01:00
@if [ ${unpushed} -ne 0 ]; then \
echo "You have unpushed changes"; \
2021-02-22 12:23:18 +01:00
exit 1; \
fi
2021-02-22 13:00:08 +01:00
@if git status | grep -i untracked -c >/dev/null 2>&1; then \
echo "You have untracked files, perhaps you forgot to commit?"; \
2021-02-22 12:23:18 +01:00
exit 1; \
fi
2021-02-22 13:00:08 +01:00
@if git status | grep "new file" -c >/dev/null 2>&1; then \
echo "You have new files, perhaps you forgot to commit?"; \
2021-02-22 12:23:18 +01:00
exit 1; \
fi
2021-02-22 13:00:08 +01:00
@if git status | grep modified -c >/dev/null 2>&1; then \
echo "You have modified files, perhaps you forgot to commit?"; \
2021-02-22 12:23:18 +01:00
exit 1; \
fi
2021-03-09 22:42:01 +01:00
@ssh tunuifranken.info 'cd ~/tunuifranken.info && git pull'