mirror of https://github.com/dspinellis/UMLGraph
Do not update files for trivial differences
This commit is contained in:
parent
abeb6c22e0
commit
786d98cd71
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Update the reference test data to match what is actually produced
|
# Update the reference test data to match what is actually produced
|
||||||
# This should only be executed after manually verifying that the
|
# This should only be executed after manually verifying that the
|
||||||
|
|
@ -8,6 +8,12 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Remove elements that do not affect the structure of a file
|
||||||
|
remove_trivia()
|
||||||
|
{
|
||||||
|
grep -v 'Generated by' "$@"
|
||||||
|
}
|
||||||
|
|
||||||
for i in dot umldoc
|
for i in dot umldoc
|
||||||
do
|
do
|
||||||
git ls-files testdata/*-ref |
|
git ls-files testdata/*-ref |
|
||||||
|
|
@ -15,7 +21,7 @@ do
|
||||||
while read refname outname
|
while read refname outname
|
||||||
do
|
do
|
||||||
if [ -r "$outname" -a -r "$outname" ] && \
|
if [ -r "$outname" -a -r "$outname" ] && \
|
||||||
! cmp -s $refname $outname
|
! diff <(remove_trivia $refname) <(remove_trivia $outname) >/dev/null
|
||||||
then
|
then
|
||||||
cp $outname $refname
|
cp $outname $refname
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue