forked from bleachbit/cleanerml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (23 loc) · 864 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
# Copyright (C) 2014 by Andrew Ziem. All rights reserved.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
# This is free software: you are free to change and redistribute it.
# There is NO WARRANTY, to the extent permitted by law.
#
#
# On some systems if not explicitly given, make uses /bin/sh, so 'make pretty' fails.
SHELL := /bin/bash
PHONY: pretty tests
pretty:
for f in {pending,release}/*xml; \
do \
xmllint --format "$$f" > "$$f.pretty"; \
diff=`diff -q "$$f" "$$f.pretty" | grep -o differ`; \
[[ "$$diff" != "differ" ]] && echo "$$f" unchanged && rm "$$f.pretty"; \
[[ -s "$$f.pretty" ]] && echo "$$f" is pretty now!!! && mv "$$f.pretty" "$$f" ; \
done; \
exit 0
tests:
for f in {pending,release}/*xml; \
do \
xmllint --noout --schema ../bleachbit/doc/cleaner_markup_language.xsd "$$f"; \
done \