compile.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/bash
  2. set -o errexit -o nounset
  3. usage () {
  4. printf "\
  5. usage: ./users/bcat/compile.sh [-c] [-j N]
  6. Compiles all keyboards for which bcat maintains keymaps.
  7. optional arguments:
  8. -c performs a clean build
  9. -j N runs N make tasks in parallel
  10. -v shows verbose output
  11. "
  12. }
  13. compile () {
  14. local keyboard=$1 layout=${2:-}
  15. FORCE_LAYOUT="$layout" SILENT="$opt_silent" make -j "$opt_parallel" "$keyboard":bcat
  16. }
  17. opt_parallel=1
  18. opt_silent=true
  19. while getopts :chj:v opt; do
  20. case $opt in
  21. c) opt_clean=1 ;;
  22. j) opt_parallel=$OPTARG ;;
  23. v) opt_silent=false ;;
  24. h) usage; exit 0 ;;
  25. \?) usage >&2; exit 2 ;;
  26. esac
  27. done
  28. if [[ -n ${opt_clean:-} ]]; then
  29. SILENT="$opt_silent" make clean
  30. fi
  31. compile 9key
  32. compile ai03/polaris 60_tsangan_hhkb
  33. compile cannonkeys/an_c 60_tsangan_hhkb
  34. compile cannonkeys/instant60 60_tsangan_hhkb
  35. compile crkbd/rev1 split_3x6_3
  36. compile dz60 60_ansi_split_bs_rshift
  37. compile dz60 60_tsangan_hhkb
  38. compile eco/rev2
  39. compile kbdfans/kbd67/hotswap 65_ansi_blocker_split_bs
  40. compile keebio/bdn9/rev1
  41. compile keebio/quefrency/rev1
  42. compile lily58/rev1
  43. compile yanghu/unicorne/f411