Patrick Williams | eebcf90 | 2022-09-13 11:20:56 -0500 | [diff] [blame] | 1 | #!/bin/bash |
2 | cd "$(dirname "$0")" || exit | ||||
3 | find . -mindepth 1 -maxdepth 1 -type d -exec rm -r {} \; | ||||
4 | ./regenerate-meson || exit | ||||
5 | rc=0 | ||||
6 | git --no-pager diff --exit-code -- . || rc=$? | ||||
7 | untracked="$(git ls-files --others --exclude-standard -- .)" || rc=$? | ||||
8 | if [ -n "$untracked" ]; then | ||||
9 | echo "Untracked files:" >&2 | ||||
10 | echo "$untracked" >&2 | ||||
11 | rc=1 | ||||
12 | fi | ||||
13 | if ((rc != 0)); then | ||||
14 | echo "Generated meson files differ from expected values" >&2 | ||||
15 | exit 1 | ||||
16 | fi |