forked from Z80-Retro/2063-Z80
-
Notifications
You must be signed in to change notification settings - Fork 0
/
v3-v4-diffs.sh
executable file
·37 lines (23 loc) · 1.06 KB
/
v3-v4-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
35
36
37
#!/bin/bash
A_TAG=v3
B_TAG=HEAD
SCRATCH=/tmp/$$-2063
#OUT_NAME=2063-Z80-${A_TAG}-${B_TAG}-delta
OUT_NAME=2063-Z80-${A_TAG}-v4.3-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
git show ${A_TAG}:gerbers/2063-Z80-B_Cu.gbl > ${A_TMP}/2063-Z80-B_Cu.gbl
git show ${A_TAG}:2063-Z80.pdf> ${A_TMP}/2063-Z80.pdf
git show ${B_TAG}:gerbers/2063-Z80-F_Cu.gtl > ${B_TMP}/2063-Z80-F_Cu.gtl
git show ${B_TAG}:gerbers/2063-Z80-B_Cu.gbl > ${B_TMP}/2063-Z80-B_Cu.gbl
git show ${B_TAG}:2063-Z80.pdf> ${B_TMP}/2063-Z80.pdf
# 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 v3 and v4rc1 PCBs
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}