S&B Volcano vaporizer remote control with Pi Pico W
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.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/bin/bash
  2. # ----------------------------------------------------------------------------
  3. # Copyright (c) 2023 Thomas Buck (thomas@xythobuz.de)
  4. #
  5. # This program is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # See <http://www.gnu.org/licenses/>.
  16. # ----------------------------------------------------------------------------
  17. BRANCH=`git symbolic-ref --short HEAD`
  18. HASH=`git rev-parse --short HEAD`
  19. DATE=`date "+%Y-%m-%d %H:%M:%S"`
  20. echo "# auto generated - do not edit" > _git.py
  21. echo "git_branch=\"$BRANCH\"" >> _git.py
  22. echo "git_hash=\"$HASH\"" >> _git.py
  23. echo "build_date=\"$DATE\"" >> _git.py
  24. if [ $# -ne 0 ] ; then
  25. cat << EOF | rshell
  26. cp _git.py /pyboard
  27. cp poll.py /pyboard
  28. cp scan.py /pyboard
  29. cp lcd.py /pyboard
  30. cp workflows.py /pyboard
  31. cp states.py /pyboard
  32. cp state_scan.py /pyboard
  33. cp state_connect.py /pyboard
  34. cp state_select.py /pyboard
  35. cp state_heat.py /pyboard
  36. cp state_wait_temp.py /pyboard
  37. cp state_wait_time.py /pyboard
  38. cp state_pump.py /pyboard
  39. cp state_notify.py /pyboard
  40. cp $1 /pyboard/main.py
  41. EOF
  42. else
  43. cat << EOF | rshell
  44. cp _git.py /pyboard
  45. cp poll.py /pyboard
  46. cp scan.py /pyboard
  47. cp lcd.py /pyboard
  48. cp workflows.py /pyboard
  49. cp states.py /pyboard
  50. cp state_scan.py /pyboard
  51. cp state_connect.py /pyboard
  52. cp state_select.py /pyboard
  53. cp state_heat.py /pyboard
  54. cp state_wait_temp.py /pyboard
  55. cp state_wait_time.py /pyboard
  56. cp state_pump.py /pyboard
  57. cp state_notify.py /pyboard
  58. rm /pyboard/main.py
  59. EOF
  60. fi