about summary refs log tree commit diff
path: root/nixpkgs/.github/workflows/compare-manuals.sh
blob: b2cc68c7831dcbf2da457cae1fc91fcabc7cb2d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p html-tidy

set -euo pipefail
shopt -s inherit_errexit

normalize() {
  tidy \
      --anchor-as-name no \
      --coerce-endtags no \
      --escape-scripts no \
      --fix-backslash no \
      --fix-style-tags no \
      --fix-uri no \
      --indent yes \
      --wrap 0 \
      < "$1" \
      2> /dev/null
}

diff -U3 <(normalize "$1") <(normalize "$2")