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.
|
2022-06-13 15:27:09 +00:00
|
|
|
# exits if xhtmlize-single-file fails.
|
2022-06-02 05:11:40 +00:00
|
|
|
|
|
|
|
set -e -u
|
|
|
|
|
|
|
|
output_dir="$1"
|
|
|
|
script_dir="$(dirname "$0")"
|
|
|
|
|
2023-11-15 17:21:26 +00:00
|
|
|
{
|
|
|
|
printf '\t' && sed -e '7q;d' "$output_dir/index.html"
|
|
|
|
} >"$output_dir/tmp.css"
|
2022-06-02 05:11:40 +00:00
|
|
|
cleanup() {
|
2022-08-02 03:54:25 +00:00
|
|
|
rm -f "$output_dir/tmp.css"
|
2022-06-02 05:11:40 +00:00
|
|
|
}
|
|
|
|
trap cleanup EXIT
|
|
|
|
|
|
|
|
export XMLLINT_INDENT=' '
|
2022-08-02 03:54:25 +00:00
|
|
|
export OUTPUT_DIR="$output_dir"
|
2023-11-15 10:26:52 +00:00
|
|
|
find "$output_dir" -type f -name '*.html' -exec sh "$script_dir/xhtmlize-single-file.sh" {} \;
|
2022-05-30 23:09:40 +00:00
|
|
|
# done
|