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.

36 lines
440 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. cd code
  13. case "$1" in
  14. ("host")
  15. pio_install
  16. ;;
  17. ("webui")
  18. npm_install
  19. ;;
  20. ("build")
  21. pio_install
  22. ;;
  23. ("release")
  24. npm_install
  25. pio_install
  26. ;;
  27. (*)
  28. echo -e "\e[1;33mUnknown stage name, exiting!\e[0m"
  29. exit 1
  30. ;;
  31. esac