File: check-compare-generated.sh

package info (click to toggle)
network-manager 1.54.3-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 71,432 kB
  • sloc: ansic: 483,661; python: 11,632; xml: 8,546; sh: 5,552; perl: 596; cpp: 178; javascript: 130; ruby: 107; makefile: 64; lisp: 22
file content (17 lines) | stat: -rwxr-xr-x 571 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

set -e

f_commited="$1"
f_generated="$2"

[ -n "$NMTST_NO_CHECK_SETTINGS_DOCS" ] && exit 0

cmp -s "$f_commited" "$f_generated" && exit 0

if [ "$NM_TEST_REGENERATE" = 1 ] ; then
   cp -f "$f_generated" "$f_commited"
else
   echo "*** Error: the generated file '$f_generated' differs from the source file '$f_commited'. 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