File: Viscomp

package info (click to toggle)
pcb-rnd 3.1.7b-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,108 kB
  • sloc: ansic: 213,400; yacc: 6,241; sh: 4,698; awk: 3,016; makefile: 2,254; lex: 1,166; python: 519; xml: 261; lisp: 154; tcl: 67; perl: 34; javascript: 6; ruby: 5
file content (29 lines) | stat: -rwxr-xr-x 525 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

if test ! -f out/$1
then
	echo "Need an output file name, e.g. arc_angles.ps" >&2
	exit 1
fi

name=`echo $1 | sed "s/[.][^.]*$//"`


mkdir -p diff

echo "convert ref..."
convert -density 200 ref/$1 diff/ref_$name.png

echo "convert out..."
convert -density 200 out/$1 diff/out_$name.png

echo "diff:"

for n in diff/ref_$name*.png
do
	m=`echo "$n" | sed "s/ref_/out_/"`
	d=`echo "$n" | sed "s/ref_/diff_/"`
	res=`compare "$n" "$m"  -metric AE  $d 2>&1`
	echo "  $n \"$res\""
	test "$res" -lt 8 && rm $d $n $m
done