check_deploy.sh 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #!/bin/bash
  2. #
  3. # Copyright (c) 2019 Clementine Computing LLC.
  4. #
  5. # This file is part of PopuFare.
  6. #
  7. # PopuFare is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU Affero General Public License as published by
  9. # the Free Software Foundation, either version 3 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # PopuFare is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU Affero General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Affero General Public License
  18. # along with PopuFare. If not, see <https://www.gnu.org/licenses/>.
  19. #
  20. # A 'quick and dirty' script to help see differences between repo
  21. # and installed programs
  22. #
  23. b=/home/bus
  24. s=/home/bus/popufare/busunit
  25. function check_fn {
  26. _a=$1
  27. _b=$2
  28. if [[ ! -e $_a || ! -e $_b ]] ; then
  29. echo "# one of $_a $_b not found"
  30. return -1
  31. fi
  32. xa=`sha256sum $_a | cut -f1 -d' '`
  33. xb=`sha256sum $_b | cut -f1 -d' '`
  34. if [[ "$xa" != "$xb" ]] ; then
  35. echo "# MISMATCH $_a $_b:"
  36. sha256sum $_a $_b
  37. return -2
  38. fi
  39. return 0
  40. }
  41. export check_fn
  42. check_fn $b/config/html/index.html $s/DIUv2/html/index.html
  43. check_fn $b/config/html/js/diu_ui.js $s/DIUv2/html/js/diu_ui.js
  44. check_fn $b/config/html/css/diustyles.css $s/DIUv2/html/css/diustyles.css
  45. check_fn $b/config/init.scm $s/passdb/init.scm
  46. check_fn $b/bin/avls $s/bin/native/avls
  47. check_fn $b/bin/billdb $s/bin/native/billdb
  48. check_fn $b/bin/client_supervisor $s/bin/native/client_supervisor
  49. check_fn $b/bin/debug_client $s/bin/native/debug_client
  50. check_fn $b/bin/ipc_server $s/bin/native/ipc_server
  51. check_fn $b/bin/gps_minder $s/bin/native/gps_minder
  52. check_fn $b/bin/paddlemgr $s/bin/native/paddlemgr
  53. check_fn $b/bin/passdb $s/bin/native/passdb
  54. check_fn $b/bin/piu_minder $s/bin/native/piu_minder
  55. check_fn $b/bin/apply_update_legacy.sh $s/scripts/apply_update_legacy.sh
  56. check_fn $b/bin/apply_update_popufare.sh $s/scripts/apply_update_popufare.sh
  57. check_fn $b/bin/apply_update.sh $s/scripts/apply_update.sh
  58. check_fn $b/config/avls_freq.txt $s/avls/avls_freq.txt
  59. check_fn $b/bin/rfid_patterns.txt $s/passdb/rfid_patterns.txt
  60. check_fn $b/bin/connection_tether.sh $s/scripts/connection_tether-ppp.sh
  61. check_fn $b/bin/custom $s/scripts/custom
  62. check_fn $b/bin/dim $s/scripts/dim
  63. check_fn $b/bin/fix_pkg_perm.sh $s/scripts/fix_pkg_perm.sh
  64. check_fn $b/bin/get_net_ids.sh $s/scripts/get_net_ids.sh
  65. check_fn $b/bin/init_bus.sh $s/scripts/init_bus.sh
  66. check_fn $b/bin/reset-gps $s/scripts/reset-gps.py
  67. check_fn $b/bin/say $s/scripts/say
  68. check_fn $b/bin/setup-serial.py $s/scripts/setup-serial.py
  69. check_fn $b/bin/showmessage $s/scripts/showmessage
  70. check_fn $b/bin/start-kiosk.sh $s/scripts/start-kiosk.sh
  71. check_fn $b/bin/unpack_server_data.sh $s/scripts/unpack_server_data.sh
  72. check_fn $b/bin/update_loop.sh $s/scripts/update_loop.sh
  73. check_fn $b/bin/volumeset $s/scripts/volumeset