-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
33 lines (24 loc) · 859 Bytes
/
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
all: csv json stats
.PHONY: check csv print-csv json stats print-json print-stats diff
check:
echo "Checking if all Id's are unique..."
grep -E "^Id[[:blank:]]" *.db | wc -l
grep -E "^Id[[:blank:]]" *.db | sort | uniq | wc -l
csv:
tools/gen_csv.pl openbsd-games.db > openbsd-games.csv
print-csv:
tools/gen_csv.pl openbsd-games.db
json:
tools/gen_json.pl openbsd-games.db > openbsd-games.json
tools/gen_json.pl openbsd-games.db | jq '.' \
> openbsd-games-formatted.json
print-json:
@tools/gen_json.pl openbsd-games.db | jq -C '.'
stats:
stats/gen_stats.pl openbsd-games.db > stats/summary-stats.json
stats/gen_stats.pl openbsd-games.db | jq '.' \
> stats/summary-stats-formatted.json
print-stats:
@stats/gen_stats.pl openbsd-games.db | jq -C '.'
diff:
@git diff -- . ':(exclude)openbsd-games.json' ':(exclude)stats/summary-stats.json'