minify-html/debug/diff/canonicalise

19 lines
401 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
2021-08-10 03:35:14 -04:00
set -Eeo pipefail
pushd "$(dirname "$0")" >/dev/null
cargo build --manifest-path c14n/Cargo.toml --release
2021-08-10 03:35:14 -04:00
cargo build --manifest-path charlines/Cargo.toml --release
for f in outputs/*/*; do
2021-08-10 03:35:14 -04:00
out=$(c14n/target/release/c14n < "$f")
if [[ "$CHARLINES" == "1" ]]; then
out=$(charlines/target/release/charlines <<< "$out")
fi
cat <<< "$out" > "$f"
done
popd >/dev/null