doc: Fail when downloading images from Debian wiki fails

Fixes: #2173.

When a wget process fails to download an image from Debian wiki for any reason,
fail the whole fetching process so that the users notices it and reruns the
process. Earlier, these were failing silently leading to zero sized images.

Tests:

- Without the change, notice that when wget process is killed during fetching of
images, it leads to incorrect image files (partially downloaded or zero sized
files).

- With or without the changes, killing wget process at other times leads to
fetch process halting indicating that wget in normal cases fails correctly.

- With the change, killing the wget process will lead to an error and the
fetching process stops.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2022-01-19 11:16:53 -08:00 committed by James Valleroy
parent 78b669d451
commit e50cab3402
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -85,7 +85,7 @@ $(fetch-main-list): fetch-main-%: fetch-cleanup-%
xsltproc $(SCRIPTS_DIR)/fetch-images.xslt manual/$(lang)/freedombox-manual.raw.xml | \
sort -u | \
awk 'NF {print "wget --quiet -O manual/$(lang)/images/" $$1 " " $$2}' | \
sh
sh -e
rm manual/$(lang)/freedombox-manual.raw.xml
fetch-pages-%: lang = $*