Patrick Williams | f6bd604 | 2020-12-14 15:10:47 -0600 | [diff] [blame] | 1 | #!/bin/bash |
William A. Kennington III | 08baf48 | 2021-06-05 12:27:15 -0700 | [diff] [blame] | 2 | cd "$(dirname "$0")" || exit |
Patrick Williams | 05cf695 | 2022-02-17 09:01:55 -0600 | [diff] [blame] | 3 | find . -mindepth 1 -maxdepth 1 -type d -exec rm -r {} \; |
William A. Kennington III | 08baf48 | 2021-06-05 12:27:15 -0700 | [diff] [blame] | 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 |
Patrick Williams | 6c861da | 2022-03-14 14:14:27 -0500 | [diff] [blame] | 9 | echo "Untracked files:" >&2 |
| 10 | echo "$untracked" >&2 |
| 11 | rc=1 |
William A. Kennington III | 08baf48 | 2021-06-05 12:27:15 -0700 | [diff] [blame] | 12 | fi |
Patrick Williams | 6c861da | 2022-03-14 14:14:27 -0500 | [diff] [blame] | 13 | if ((rc != 0)); then |
| 14 | echo "Generated meson files differ from expected values" >&2 |
| 15 | exit 1 |
Patrick Williams | f6bd604 | 2020-12-14 15:10:47 -0600 | [diff] [blame] | 16 | fi |