blob: dba8109118c20fa1a13520b4bc8dcc912eacb028 [file] [log] [blame]
Patrick Williamsf6bd6042020-12-14 15:10:47 -06001#!/bin/bash
William A. Kennington III08baf482021-06-05 12:27:15 -07002cd "$(dirname "$0")" || exit
Patrick Williams05cf6952022-02-17 09:01:55 -06003find . -mindepth 1 -maxdepth 1 -type d -exec rm -r {} \;
William A. Kennington III08baf482021-06-05 12:27:15 -07004./regenerate-meson || exit
5rc=0
6git --no-pager diff --exit-code -- . || rc=$?
7untracked="$(git ls-files --others --exclude-standard -- .)" || rc=$?
8if [ -n "$untracked" ]; then
Patrick Williams6c861da2022-03-14 14:14:27 -05009 echo "Untracked files:" >&2
10 echo "$untracked" >&2
11 rc=1
William A. Kennington III08baf482021-06-05 12:27:15 -070012fi
Patrick Williams6c861da2022-03-14 14:14:27 -050013if ((rc != 0)); then
14 echo "Generated meson files differ from expected values" >&2
15 exit 1
Patrick Williamsf6bd6042020-12-14 15:10:47 -060016fi