diff options
| author | Michael Biebl <biebl@debian.org> | 2021-02-11 18:11:46 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2021-02-11 18:11:46 +0100 |
| commit | 80ec1decc49c72efec2a8b87c06245c92c0ab807 (patch) | |
| tree | e3b229aa94e8dcf0590f2317664176e7b8f7607b /tools/check-compare-generated.sh | |
| parent | 65f86e8f56267192d42f2b629fc6b0c99fb9cd0c (diff) | |
New upstream version 1.29.90 upstream/1.29.90
Diffstat (limited to 'tools/check-compare-generated.sh')
| -rwxr-xr-x | tools/check-compare-generated.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/check-compare-generated.sh b/tools/check-compare-generated.sh new file mode 100755 index 00000000..44b70f95 --- /dev/null +++ b/tools/check-compare-generated.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +srcdir="$1" +builddir="$2" +doc_h="$3" + +[ -n "$NMTST_NO_CHECK_SETTINGS_DOCS" ] && exit 0 + +cmp -s "${srcdir}/${doc_h}.in" "${builddir}/${doc_h}" && exit 0 + +if [ "$NM_TEST_REGENERATE" = 1 ] ; then + cp -f "${builddir}/${doc_h}" "${srcdir}/${doc_h}.in" +else + echo "*** Error: the generated file '${builddir}/${doc_h}' differs from the source file '${srcdir}/${doc_h}.in'. You probably should copy the generated file over to the source file. You can skip this test by setting NMTST_NO_CHECK_SETTINGS_DOCS=yes. You can also automatically copy the file by rerunning the test with NM_TEST_REGENERATE=1" + exit 1 +fi |