2022-05-30 23:09:40 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# takes an arg for the output dir.
|
2022-06-02 05:11:40 +00:00
|
|
|
# Runs xhtmlize-single-file.sh on every single html file in the output dir.
|
|
|
|
|
|
|
|
set -e -u
|
|
|
|
|
|
|
|
output_dir="$1"
|
|
|
|
script_dir="$(dirname "$0")"
|
|
|
|
|
2022-06-05 05:36:55 +00:00
|
|
|
printf '\t<style>%s</style>\n' "$(htmlq -t style <"$output_dir/index.html")" >tmp.css
|
2022-06-02 05:11:40 +00:00
|
|
|
cleanup() {
|
|
|
|
rm -f "tmp.css"
|
|
|
|
}
|
|
|
|
trap cleanup EXIT
|
|
|
|
|
|
|
|
export XMLLINT_INDENT=' '
|
|
|
|
find "$output_dir" -type f -name '*.html' \
|
|
|
|
-exec sh "$script_dir/xhtmlize-single-file.sh" {} \;
|
2022-05-30 23:09:40 +00:00
|
|
|
# done
|