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 |
| 8 | bazel build -c opt //y2018/vision:image_streamer \ |
| 9 | //aos/vision/tools:camera_primer --cpu=armhf-debian |
| 10 | |
| 11 | # Remove files before copying them. |
| 12 | # Doing so avoids problems with trying to copy over a file in use. |
| 13 | ssh "${JETSON}" rm -f image_streamer camera_primer exposure_2018.sh startup.sh |
| 14 | |
| 15 | # Copy files to Jetson |
| 16 | scp bazel-bin/y2018/vision/image_streamer "${JETSON}":. |
| 17 | scp bazel-bin/aos/vision/tools/camera_primer "${JETSON}":. |
| 18 | scp y2018/vision/exposure_2018.sh "${JETSON}":. |
| 19 | scp y2018/vision/startup.sh "${JETSON}":. |
| 20 | |
| 21 | ssh "${JETSON}" sync |
| 22 | |
| 23 | # Can't restart with supervisorctl because the USB devices don't come up reliably... |
| 24 | echo "You just restart the Jetson now" >&2 |