blob: ff3ee016076dcd9ce95f8bfa44b10a0919987fcb [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
Parker Schuh46b48812019-02-22 20:45:36 -080010echo "Mount jevois ..."
11./jevois-cmd usbsd
12
13echo "Waiting for fs ..."
14while [ ! -d /media/$USER/JEVOIS ]
15do
16 sleep 1
17done
18echo "OK"
19
20echo "Copying files ..."
21cp ./austin_cam.sh /media/$USER/JEVOIS/
Alex Perry3a696732019-03-02 22:30:31 -080022cp ./launch.sh /media/$USER/JEVOIS/deploy/
23
24cp "${BAZEL_BIN}/y2019/vision/target_sender" \
25 "${BAZEL_BIN}/y2019/vision/serial_waiter" \
26 /media/$USER/JEVOIS/deploy/
Parker Schuh46b48812019-02-22 20:45:36 -080027
28echo "Unmount sd card ..."
29umount /media/$USER/JEVOIS
30echo "OK"
31
32echo "Rebooting Jevois."
33./jevois-cmd restart