aboutsummaryrefslogtreecommitdiff
path: root/convert.sh
diff options
context:
space:
mode:
Diffstat (limited to 'convert.sh')
-rwxr-xr-xconvert.sh23
1 files changed, 21 insertions, 2 deletions
diff --git a/convert.sh b/convert.sh
index b05f705..4a0fc95 100755
--- a/convert.sh
+++ b/convert.sh
@@ -7,6 +7,9 @@
set -e
+# this facilitates reproducible conversions, making all timestamps the same for consecutive runs
+export A2K_STARTTIME="1476542686"
+
altiumdir="rev03-Altium"
kicaddir="rev03-KiCad"
@@ -29,14 +32,30 @@ cd ..
rm -rf "${kicaddir}"
mkdir "${kicaddir}"
cp ${altiumdir}/*.{sch,lib} "${kicaddir}"/
+rm ${kicaddir}/rev02*-cache.lib
cp ${altiumdir}/CrypTech-PcbDoc.kicad_pcb "${kicaddir}/Cryptech Alpha.kicad_pcb"
cp "Cryptech Alpha.pro.template" "${kicaddir}/Cryptech Alpha.pro"
cp "Cryptech Alpha.sch.template" "${kicaddir}/Cryptech Alpha.sch"
+cd ${kicaddir}
+
# Change to more sensible filenames
-cd "${kicaddir}"
rename 's/-SchDoc//' rev02_*
-sed -i -e 's/-SchDoc//g' *
+sed -i -e 's/-SchDoc//g' *.{sch,lib}
+
+# Change some PCB parameters
+sed -i -e 's/trace_min 0.254/trace_min 0.15/g' "Cryptech Alpha.kicad_pcb"
+# show ratsnest
+sed -i -e 's/visible_elements 7FFFF77F/visible_elements 7FFFFF7F/g' "Cryptech Alpha.kicad_pcb"
+# Power layers
+for l in 1 3 4 6; do
+ sed -i -e "s/${l} In${l}.Cu signal/${l} In${l}.Cu power/g" "Cryptech Alpha.kicad_pcb"
+done
+# Mixed layers
+for l in 2 5; do
+ sed -i -e "s/${l} In${l}.Cu signal/${l} In${l}.Cu mixed/g" "Cryptech Alpha.kicad_pcb"
+done
+
# Sheet number fixups. This hides all the hierarchical sub-sheets from the project view.
num_sheets=$(ls Cryptech\ Alpha.sch rev02*sch | wc -l)