mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-23 11:13:44 +02:00
sch2fig/test/comp: add optional directory argument
This commit is contained in:
parent
93ba849a19
commit
2cea73d040
@ -1,9 +1,23 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
echo "usage: $0 [dir]" 1>&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[ "$2" ] && usage
|
||||||
|
[ "${1#-}" != "$1" ] && usage
|
||||||
|
|
||||||
|
dir=${1:-.}
|
||||||
|
|
||||||
diffs=0
|
diffs=0
|
||||||
rm -f _diff*png
|
rm -f $dir/_diff*png
|
||||||
for n in out*.png; do
|
for n in $dir/out*.png; do
|
||||||
ref=ref${n#out}
|
out=`basename "$n"`
|
||||||
diff=_diff${n#out}
|
ref=$dir/ref${out#out}
|
||||||
|
diff=$dir/_diff${out#out}
|
||||||
if ! compare -metric AE $ref $n - >/dev/null; then
|
if ! compare -metric AE $ref $n - >/dev/null; then
|
||||||
diffs=`expr $diffs + 1`
|
diffs=`expr $diffs + 1`
|
||||||
compare -metric AE $ref $n $diff
|
compare -metric AE $ref $n $diff
|
||||||
|
Loading…
Reference in New Issue
Block a user