diff options
author | Fredrik Thulin <fredrik@thulin.net> | 2017-09-26 12:51:13 +0200 |
---|---|---|
committer | Fredrik Thulin <fredrik@thulin.net> | 2017-09-26 12:51:13 +0200 |
commit | 0c8f8870312e4abb1cc24109296e147f83d15c78 (patch) | |
tree | 08872bc7763be0c1895ac0a32854172b5d213625 /convert.sh | |
parent | 8290447d610bc6decbad2dde22e0578b6393b271 (diff) |
wrl shape work
Diffstat (limited to 'convert.sh')
-rwxr-xr-x | convert.sh | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -51,9 +51,16 @@ 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 - XXX should be made relative paths +# Fix wrl paths wrlpath=$(readlink -f ${altiumdir}/wrlshp) -sed -i -e "s!${wrlpath}!wrlshp!g" ${kicaddir}/rev02_* +echo "Changing WRL path ${wrlpath} to relative path wrlshp/" +sed -i -e "s!${wrlpath}!wrlshp!g" ${kicaddir}/rev02_* ${kicaddir}/*.kicad_pcb + +# There are more WRL files in this directory +cp -rp ${altiumdir}/wrl/* ${kicaddir}/wrlshp/ +wrlpath=$(readlink -f ${altiumdir}/wrl) +echo "Changing WRL path ${wrlpath} to relative path wrlshp/" +sed -i -e "s!${wrlpath}!wrlshp!g" ${kicaddir}/rev02_* ${kicaddir}/*.kicad_pcb cd ${kicaddir} @@ -83,11 +90,11 @@ ls Cryptech\ Alpha.sch rev02*sch | while read file; do done # Make further modifications to the layout using KiCAD's Python bindings -mkdir ../tmp +test -d ../tmp || mkdir ../tmp cp "Cryptech Alpha.kicad_pcb" "../tmp/Cryptech Alpha.kicad_pcb.a2k-out" ../fix-pcb.py "Cryptech Alpha.kicad_pcb" "Cryptech Alpha.kicad_pcb" mv "Cryptech Alpha.kicad_pcb.before-fix-pcb" ../tmp -diff -u "../Cryptech Alpha.kicad_pcb.before-fix-pcb" "Cryptech Alpha.kicad_pcb" || true +diff -u "../tmp/Cryptech Alpha.kicad_pcb.before-fix-pcb" "Cryptech Alpha.kicad_pcb" || true echo "" echo "Done. The leftovers from conversion is in ${altiumdir}, and you can start KiCad like this:" |