subsurface/scripts/prep-manual.sh
Dirk Hohndel 891805763e build-system: remove relative paths to icons
Asciidoc appears to insert './images' references when using the admonitionblock.
Clean that up in the post processing of the user manual for HTML.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-06-04 09:30:54 -07:00

8 lines
360 B
Bash
Executable file

#!/bin/bash
cat $1 | \
sed -e '1,/title/d;/<\/head>/,/<body/d;/<\/body/,/<\/html/d' | \
sed -e '/^@media/,/^}/d' | \
sed -e 's/src="images/src="\/images/g' | \
sed -e 's/src="\.\/images/src="\/images/g' | \
sed -e 's/src="mobile-images/src="\/mobile-images/g' | \
html-minifier --collapse-whitespace --keep-closing-slash --minify-js --minify-css > $1.wp