-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
60 lines (39 loc) · 1.26 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/make -f
# in "normal" usage mode, only sensors need to be updated
serial: clean sensor clean2
sensor: .settings data/sensors.json
./json-upload || true
all: clean json upload tar clean2
json: data/sensors.json data/sgv-hist.json #data/sgv-real.json
upload: .settings data/sensors.json data/sgv-hist.json #data/sgv-real.json
./json-upload
tar:
mkdir -p SAVE
LC_ALL=C tar cf SAVE/all-`date +%Y%m%d-%H%M%S`.tar data tmp log
clean:
rm -rf tmp
rm -rf data log
clean2:
rm -rf tmp
rm -rf data log
tmp/apps/com.freestylelibre.app.de/f/sas.db:
./db-from-app
data/sensors.dump: tmp/apps/com.freestylelibre.app.de/f/sas.db
./db-to-dump
data/sg-hist.dump: tmp/apps/com.freestylelibre.app.de/f/sas.db
./db-to-dump
data/sg-real.dump: tmp/apps/com.freestylelibre.app.de/f/sas.db
./db-to-dump
data/last-sensor.time: .settings
./query-last-sensor
data/last-sgv-hist.time: .settings
./query-last-sgv
#data/last-sgv-real.time: .settings
# ./query-last-sgv
data/sensors.json: data/sensors.dump data/last-sensor.time
./dump-sensors-to-json
data/sgv-hist.json: data/sg-hist.dump data/last-sgv-hist.time
./dump-sgv-to-json
#data/sgv-real.json: data/sg-real.dump data/last-sgv-real.time
# ./dump-sgv-to-json
.PHONY: serial sensor all json upload tar