Makefile: remove "true" after tidy

If in a series of commands, and not the last, true has no effect
If in the last command, it is better to exit if there is a real
error in tidy, so use "|| test $$? -le 1", but only when tidy is
the last in a series of commands

Part of a patch by Boian Berberov
This commit is contained in:
Pierre Labastie 2024-01-27 16:58:34 +01:00
parent 4ac089b5b2
commit 16d01822df

View File

@ -53,7 +53,6 @@ book: validate profile-html
@echo "Running Tidy and obfuscate.sh..."
$(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \
tidy -config tidy.conf $$filename; \
true; \
/bin/bash obfuscate.sh $$filename; \
sed -e "s|text/html|application/xhtml+xml|g" \
-i $$filename; \
@ -98,7 +97,7 @@ nochunks: validate profile-html
$(RENDERTMP)/lfs-html.xml
@echo "Running Tidy..."
$(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
$(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || test $$? -le 1
@echo "Running obfuscate.sh..."
$(Q)bash obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT)