Mirror of espurna firmware for wireless switches and more
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.

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