blob: 7cedfb0e54a0f7c3670b1d50247633522ff75710 [file] [log] [blame]
Parker Schuh46b48812019-02-22 20:45:36 -08001#!/bin/sh
Alex Perry3a696732019-03-02 22:30:31 -08002echo "Building executables"
3readonly BAZEL_OPTIONS="-c opt --cpu=armhf-debian"
4readonly BAZEL_BIN="$(bazel info ${BAZEL_OPTIONS} bazel-bin)"
5
6bazel build ${BAZEL_OPTIONS} \
7 //y2019/vision:target_sender \
8 //y2019/vision:serial_waiter
9
Ben Fredricksona8c3d552019-03-03 14:14:53 -080010if [ ! -d /media/$USER/JEVOIS ]
11then
12 echo "Mount jevois at /media/$USER/JEVOIS ..."
13 ./jevois-cmd usbsd
14fi
Parker Schuh46b48812019-02-22 20:45:36 -080015
16echo "Waiting for fs ..."
17while [ ! -d /media/$USER/JEVOIS ]
18do
19 sleep 1
20done
21echo "OK"
22
23echo "Copying files ..."
24cp ./austin_cam.sh /media/$USER/JEVOIS/
Alex Perry3a696732019-03-02 22:30:31 -080025cp ./launch.sh /media/$USER/JEVOIS/deploy/
26
27cp "${BAZEL_BIN}/y2019/vision/target_sender" \
28 "${BAZEL_BIN}/y2019/vision/serial_waiter" \
29 /media/$USER/JEVOIS/deploy/
Parker Schuh46b48812019-02-22 20:45:36 -080030
31echo "Unmount sd card ..."
32umount /media/$USER/JEVOIS
33echo "OK"
34
35echo "Rebooting Jevois."
36./jevois-cmd restart