Parker Schuh | 46b4881 | 2019-02-22 20:45:36 -0800 | [diff] [blame] | 1 | #!/bin/sh |
Alex Perry | 3a69673 | 2019-03-02 22:30:31 -0800 | [diff] [blame] | 2 | echo "Building executables" |
| 3 | readonly BAZEL_OPTIONS="-c opt --cpu=armhf-debian" |
| 4 | readonly BAZEL_BIN="$(bazel info ${BAZEL_OPTIONS} bazel-bin)" |
| 5 | |
| 6 | bazel build ${BAZEL_OPTIONS} \ |
| 7 | //y2019/vision:target_sender \ |
| 8 | //y2019/vision:serial_waiter |
| 9 | |
Ben Fredrickson | a8c3d55 | 2019-03-03 14:14:53 -0800 | [diff] [blame^] | 10 | if [ ! -d /media/$USER/JEVOIS ] |
| 11 | then |
| 12 | echo "Mount jevois at /media/$USER/JEVOIS ..." |
| 13 | ./jevois-cmd usbsd |
| 14 | fi |
Parker Schuh | 46b4881 | 2019-02-22 20:45:36 -0800 | [diff] [blame] | 15 | |
| 16 | echo "Waiting for fs ..." |
| 17 | while [ ! -d /media/$USER/JEVOIS ] |
| 18 | do |
| 19 | sleep 1 |
| 20 | done |
| 21 | echo "OK" |
| 22 | |
| 23 | echo "Copying files ..." |
| 24 | cp ./austin_cam.sh /media/$USER/JEVOIS/ |
Alex Perry | 3a69673 | 2019-03-02 22:30:31 -0800 | [diff] [blame] | 25 | cp ./launch.sh /media/$USER/JEVOIS/deploy/ |
| 26 | |
| 27 | cp "${BAZEL_BIN}/y2019/vision/target_sender" \ |
| 28 | "${BAZEL_BIN}/y2019/vision/serial_waiter" \ |
| 29 | /media/$USER/JEVOIS/deploy/ |
Parker Schuh | 46b4881 | 2019-02-22 20:45:36 -0800 | [diff] [blame] | 30 | |
| 31 | echo "Unmount sd card ..." |
| 32 | umount /media/$USER/JEVOIS |
| 33 | echo "OK" |
| 34 | |
| 35 | echo "Rebooting Jevois." |
| 36 | ./jevois-cmd restart |