Geen omschrijving
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

generate_plot.sh 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/bash
  2. # SPDX-FileCopyrightText: 2023 - 2024 Thomas Buck <thomas@xythobuz.de>
  3. # SPDX-License-Identifier: CERN-OHL-S-2.0+
  4. #
  5. # ------------------------------------------------------------------------------
  6. # | Copyright (c) 2023 - 2024 Thomas Buck <thomas@xythobuz.de> |
  7. # | |
  8. # | This source describes Open Hardware and is licensed under the CERN-OHL-S v2 |
  9. # | or any later version. |
  10. # | |
  11. # | You may redistribute and modify this source and make products using it under |
  12. # | the terms of the CERN-OHL-S v2 (https://ohwr.org/cern_ohl_s_v2.txt) |
  13. # | or any later version. |
  14. # | |
  15. # | This source is distributed WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, |
  16. # | INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY AND FITNESS FOR A |
  17. # | PARTICULAR PURPOSE. Please see the CERN-OHL-S v2 (or any later version) |
  18. # | for applicable conditions. |
  19. # | |
  20. # | Source location: https://github.com/drinkrobotics/dispensy |
  21. # | |
  22. # | As per CERN-OHL-S v2 section 4, should You produce hardware based on this |
  23. # | source, You must where practicable maintain the Source Location visible |
  24. # | on the external case of the Gizmo or other products you make using this |
  25. # | source. |
  26. # ------------------------------------------------------------------------------
  27. cd "$(dirname "$0")"
  28. OUTDIR="plot"
  29. LAYER="F.Cu,B.Cu,F.Mask,B.Mask,F.Paste,B.Paste,F.Silkscreen,B.Silkscreen,Edge.Cuts,User.Drawings"
  30. rm -rf $OUTDIR
  31. mkdir -p $OUTDIR
  32. for VAR in pdf svg
  33. do
  34. echo "Exporting schematic $VAR"
  35. rm -rf dispensy_sch.$VAR
  36. kicad-cli sch export $VAR \
  37. -t "KiCad Default" \
  38. -o $OUTDIR/dispensy_sch.$VAR \
  39. dispensy.kicad_sch
  40. echo "Exporting board $VAR"
  41. rm -rf dispensy_pcb.$VAR
  42. kicad-cli pcb export $VAR \
  43. -t "KiCad Classic" \
  44. -l $LAYER \
  45. -o $OUTDIR/dispensy_pcb.$VAR \
  46. dispensy.kicad_pcb
  47. echo
  48. done