Skip to content

Commit

Permalink
KiKit 1.3.0 build script edits
Browse files Browse the repository at this point in the history
  • Loading branch information
krikun98 committed Oct 11, 2023
1 parent 151f8c8 commit e713c91
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh
#!/bin/bash

container_cmd="docker run -v=$(pwd):/kikit -w=/kikit --rm yaqwsx/kikit:v1.0.2"
container_cmd="docker run -v=$(pwd):/kikit -w=/kikit --rm yaqwsx/kikit:v1.3.0-v7"
container_cmd_draw="docker run -v=$(pwd):/kikit -w=/kikit --rm --entrypoint pcbdraw yaqwsx/kikit:v1.3.0-v7"

# Images
echo "Drawing image files"
Expand All @@ -11,8 +12,8 @@ do
do
short_option="$(basename "$option")"
file="$(find $option -type f -name '*.kicad_pcb')"
${container_cmd} pcbdraw --style builtin:set-blue-enig.json "$file" images/"$name"_"$short_option".png >> /dev/null
${container_cmd} pcbdraw --style builtin:set-blue-enig.json --back "$file" images/"$name"_"$short_option"_back.png >> /dev/null
${container_cmd_draw} plot --style set-blue-enig "$file" images/"$name"_"$short_option".png >> /dev/null
${container_cmd_draw} plot --style set-blue-enig --side back "$file" images/"$name"_"$short_option"_back.png >> /dev/null
done
done

Expand All @@ -25,7 +26,7 @@ do
do
short_option="$(basename "$option")"
file="$(find $option -type f -name '*.kicad_pcb')"
${container_cmd} kikit fab jlcpcb --no-assembly "$file" gerbers/"$name"_"$short_option" --no-drc
${container_cmd} fab jlcpcb --no-assembly "$file" gerbers/"$name"_"$short_option" --no-drc
mv gerbers/"$name"_"$short_option"/gerbers.zip gerbers/"$name"_"$short_option"_gerbers.zip
rm -r gerbers/"$name"_"$short_option"
done
Expand All @@ -41,11 +42,10 @@ for option in "$name"/*/
short_option="$(basename "$option")"
file="$(find $option -type f -name '*.kicad_pcb')"
file_name=$(basename "$file" .kicad_pcb)
${container_cmd} kikit export dxf "$file" dxf/"$name"_"$short_option"
${container_cmd} export dxf "$file" dxf/"$name"_"$short_option"
mv dxf/"$name"_"$short_option"/"$file_name"-EdgeCuts.dxf dxf/"$name"_"$short_option".dxf
rm -r dxf/"$name"_"$short_option"
done
done

zip -jr dxf/case_files dxf/

0 comments on commit e713c91

Please sign in to comment.