-
Notifications
You must be signed in to change notification settings - Fork 19
/
V4.3.2-V4.3.3-diffs.sh
executable file
·34 lines (22 loc) · 1.09 KB
/
V4.3.2-V4.3.3-diffs.sh
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
30
31
32
33
34
#!/bin/bash
A_TAG=V4.3.2
B_TAG=V4.3.3
SCRATCH=/tmp/$$-2063
OUT_NAME=2063-Z80-${A_TAG}-${B_TAG}-delta
A_TMP=${SCRATCH}/${A_TAG}
B_TMP=${SCRATCH}/${B_TAG}
mkdir -p ${A_TMP}
mkdir -p ${B_TMP}
git show ${A_TAG}:gerbers/2063-Z80-F_Cu.gtl > ${A_TMP}/2063-Z80-F_Cu.gtl || exit 1
git show ${A_TAG}:gerbers/2063-Z80-B_Cu.gbl > ${A_TMP}/2063-Z80-B_Cu.gbl || exit 1
git show ${A_TAG}:2063-Z80.pdf> ${A_TMP}/2063-Z80.pdf || exit 1
git show ${B_TAG}:gerbers/2063-Z80-F_Cu.gtl > ${B_TMP}/2063-Z80-F_Cu.gtl || exit 1
git show ${B_TAG}:gerbers/2063-Z80-B_Cu.gbl > ${B_TMP}/2063-Z80-B_Cu.gbl || exit 1
git show ${B_TAG}:2063-Z80.pdf> ${B_TMP}/2063-Z80.pdf || exit 1
# Generate a .pdf showing the diffs in the schematic drawings
compare ${A_TMP}/2063-Z80.pdf ${B_TMP}/2063-Z80.pdf ${OUT_NAME}-schematic.pdf
# Generate .png files showing the diffs between the A and B PCB versions
gerbv --dpi=600 --border=0 --export=png --output=${A_TMP}.png ${A_TMP}/*.{gtl,gbl}
gerbv --dpi=600 --border=0 --export=png --output=${B_TMP}.png ${B_TMP}/*.{gtl,gbl}
compare ${A_TMP}.png ${B_TMP}.png ${OUT_NAME}-pcb.png
rm -rf ${SCRATCH}