6 echo \\tpcbdiff firstfile secondfile
7 echo \\tView a graphical
diff of PCB files
9 echo \\tTo use with git
, just place this
script in your PATH and
do
10 echo \\tgit difftool
-x pcbdiff ...
12 echo \\tTo use with mercurial
, add the following lines to your .hgrc
:
13 echo \\t
\\t
[extensions
]
14 echo \\t
\\thgext.extdiff
=
16 echo \\t
\\tcmd.pcbdiff
= /PATH
/TO
/pcbdiff
17 echo \\tthen to invoke it
, do
18 echo \\thg pcbdiff ...
20 echo \\tTo use with subversion
, place it
in your PATH and
do
21 echo \\tsvn
diff --diff-cmd pcbdiff ...
23 echo \\tRequirements
: Imagemagick and gschem be installed
27 for PROG
in pcb convert composite
29 if which $PROG > /dev
/null
33 echo "$PROG is not found. Either it is not installed, or not in your PATH"
38 #In case the script was invoked with extra option arguments, throw them away
41 if test -d $1 -o -d $2
42 then echo "ERROR: pcbdiff cannot diff entire directories"
48 LEFTPNG
=`mktemp --tmpdir pcbdiff.XXXXXXXXXX`
49 RIGHTPNG
=`mktemp --tmpdir pcbdiff.XXXXXXXXXX`
50 LEFTBNW
=`mktemp --tmpdir pcbdiff.XXXXXXXXXX`
51 RIGHTBNW
=`mktemp --tmpdir pcbdiff.XXXXXXXXXX`
52 DIFFPNG
=`mktemp --tmpdir pcbdiff.XXXXXXXXXX`
54 pcb
-x png
--dpi 200 --only-visible --photo-mode --outfile $LEFTPNG $LEFTFILE
55 pcb
-x png
--dpi 200 --only-visible --photo-mode --outfile $RIGHTPNG $RIGHTFILE
56 convert
-colorspace gray
$LEFTPNG $LEFTBNW
57 convert
-colorspace gray
$RIGHTPNG $RIGHTBNW
58 composite
-stereo 0 $LEFTBNW $RIGHTBNW $DIFFPNG