Fork of the espurna firmware for `mhsw` switches
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.

41 lines
509 B

  1. #!/bin/bash
  2. set -x -e -v
  3. npm_install() {
  4. npm install -g npm@latest
  5. npm ci
  6. }
  7. pio_install() {
  8. pip3 install -U platformio
  9. pio upgrade --dev
  10. pio platform update -p
  11. }
  12. host_install() {
  13. pio platform install native
  14. }
  15. cd code
  16. case "$1" in
  17. ("host")
  18. pio_install
  19. host_install
  20. ;;
  21. ("webui")
  22. npm_install
  23. ;;
  24. ("build")
  25. pio_install
  26. ;;
  27. ("release")
  28. npm_install
  29. pio_install
  30. ;;
  31. (*)
  32. echo -e "\e[1;33mUnknown stage name, exiting!\e[0m"
  33. exit 1
  34. ;;
  35. esac