aboutsummaryrefslogtreecommitdiff
path: root/convert.sh
diff options
context:
space:
mode:
Diffstat (limited to 'convert.sh')
-rwxr-xr-xconvert.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/convert.sh b/convert.sh
index 8d1147b..904912b 100755
--- a/convert.sh
+++ b/convert.sh
@@ -18,7 +18,8 @@ kicaddir="rev03-KiCad"
test -d altium2kicad || git clone -b ft-2017-09-cryptech_mods https://github.com/fredrikt/altium2kicad
rm -rf ${altiumdir}
-cp -rp ../../../hardware/cad/rev03/ ${altiumdir}
+test -d hardware || git clone https://git.cryptech.is/hardware.git
+cp -rp hardware/cad/rev03 ${altiumdir}
cd ${altiumdir}
@@ -42,7 +43,7 @@ cp -rp ${altiumdir}/wrlshp ${kicaddir}/wrlshp
cp "Cryptech Alpha.pro.template" "${kicaddir}/Cryptech Alpha.pro"
cp "Cryptech Alpha.sch.template" "${kicaddir}/Cryptech Alpha.sch"
-# Fix wrl paths
+# Fix wrl paths - XXX should be made relative paths
wrlpath=$(readlink -f ${altiumdir}/wrlshp)
sed -i -e "s!${wrlpath}!wrlshp!g" ${kicaddir}/rev02_*
@@ -73,10 +74,10 @@ ls Cryptech\ Alpha.sch rev02*sch | while read file; do
num=$[$num + 1]
done
-# Make a copy used as input file in fix-layer-4.py
-cp "Cryptech Alpha.kicad_pcb" "convert.kicad_pcb"
-../fix-pcb.py "convert.kicad_pcb" "Cryptech Alpha.kicad_pcb"
-
+# Make further modifications to the layout using KiCAD's Python bindings
+cp "Cryptech Alpha.kicad_pcb" "Cryptech Alpha.kicad_pcb.a2k-out"
+../fix-pcb.py "Cryptech Alpha.kicad_pcb" "Cryptech Alpha.kicad_pcb"
+diff -u "Cryptech Alpha.kicad_pcb.before-fix-pcb" "Cryptech Alpha.kicad_pcb"
echo ""
echo "Done. The leftovers from conversion is in ${altiumdir}, and you can start KiCad like this:"