Michael Schuh | d0f6181 | 2018-04-07 21:37:29 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Austin Schuh | d3acc5f | 2018-07-08 16:06:07 -0700 | [diff] [blame] | 3 | set -e |
| 4 | |
Michael Schuh | d0f6181 | 2018-04-07 21:37:29 -0700 | [diff] [blame] | 5 | JETSON="root@$1" |
| 6 | |
| 7 | # To build for the Jetson, use |
Austin Schuh | 6618369 | 2018-09-16 16:30:07 -0700 | [diff] [blame^] | 8 | bazel build -c opt //y2018/vision:image_streamer --cpu=armhf-debian |
Michael Schuh | d0f6181 | 2018-04-07 21:37:29 -0700 | [diff] [blame] | 9 | |
| 10 | # Copy files to Jetson |
Austin Schuh | 6618369 | 2018-09-16 16:30:07 -0700 | [diff] [blame^] | 11 | rsync -av --progress bazel-bin/y2018/vision/image_streamer y2018/vision/exposure_loop.sh "${JETSON}":. |
| 12 | rsync -av --progress y2018/vision/exposure_loop.conf y2018/vision/vision.conf "${JETSON}":/etc/supervisor/conf.d/ |
Michael Schuh | d0f6181 | 2018-04-07 21:37:29 -0700 | [diff] [blame] | 13 | |
| 14 | ssh "${JETSON}" sync |
| 15 | |
| 16 | # Can't restart with supervisorctl because the USB devices don't come up reliably... |
Austin Schuh | 6618369 | 2018-09-16 16:30:07 -0700 | [diff] [blame^] | 17 | echo "Restart the Jetson now" >&2 |