blob: 833dac6a4a9b968c95c0127d3ee6938a363c95d9 [file] [log] [blame]
Austin Schuha617d032017-09-14 00:06:59 -07001#!/bin/bash
2cd $(dirname $0)
3pwd
4
5set -e
6
7if [ $# != 1 ];
8then
9 echo "Usage: setup_robot.sh 971"
10 exit 1
11fi
12
13readonly ROBOT_HOSTNAME="$1"
14
15bazel build -c opt @arm_frc_linux_gnueabi_repo//...
16
Austin Schuhcb091712018-02-21 20:01:55 -080017echo "Looking to see if l is aliased right."
Austin Schuha617d032017-09-14 00:06:59 -070018if $(ssh "admin@${ROBOT_HOSTNAME}" "cat /etc/profile" | grep -Fq "alias l");
19then
20 echo "Already has l alias"
21else
22 echo "Adding l alias"
23 ssh "admin@${ROBOT_HOSTNAME}" 'echo "alias l=\"ls -la\"" >> /etc/profile'
24fi
25
Austin Schuha617d032017-09-14 00:06:59 -070026ssh "admin@${ROBOT_HOSTNAME}" 'PATH="${PATH}":/usr/local/natinst/bin/ /usr/local/frc/bin/frcKillRobot.sh -r -t'
27
28echo "Deploying robotCommand startup script"
29scp aos/config/robotCommand "admin@${ROBOT_HOSTNAME}:/home/lvuser/"
30
Austin Schuhcb091712018-02-21 20:01:55 -080031scp bazel-971-Robot-Code/external/arm_frc_linux_gnueabi_repo/usr/arm-frc-linux-gnueabi/lib/libstdc++.so.6.0.21 "admin@${ROBOT_HOSTNAME}:/usr/lib/"