-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (33 loc) · 1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
include Python.mk
PROJECT = tf2mon
COV_FAIL_UNDER = 49
lint :: mypy
doc :: README.md
#-------------------------------------------------------------------------------
# ./.tf2 is a symlink to some .../SteamLibrary/steamapps/common/Team Fortress 2/tf/
CONLOG_FILE := .tf2/console.log
CONLOG_STAT := $(shell stat -c '%Y %s' $(CONLOG_FILE))
CONLOG_BKUP := conlogs/console.log-$(word 1, $(CONLOG_STAT))
CONLOG_SIZE := $(word 2, $(CONLOG_STAT))
rotate: $(CONLOG_BKUP)
$(CONLOG_BKUP): $(CONLOG_FILE)
if [ $(CONLOG_SIZE) != 0 ]; then \
mv $< $@ ;\
chmod 644 $@ ;\
ln -sf $@ latest ;\
ls -lh $@ latest ;\
cp /dev/null $< ;\
else \
echo not rotating empty logfile ;\
fi ;\
ls -lh $<
cleanlog: latest
python -m tf2mon --clean-con-logfile latest >$@
distclean::
rm -f cleanlog latest
uml:
pdm run pyreverse -ASmy tf2mon ../libcli ../libcurses
dot -Tpdf classes.dot -o output.pdf
xdg-open output.pdf
#-------------------------------------------------------------------------------
# vim: set ts=8 sw=8 noet: