From 7e6b3d5dda5079a7a9dda555d196fbc1e1c1e5d9 Mon Sep 17 00:00:00 2001 From: Zareen Choudhury Date: Thu, 25 Jan 2018 13:55:15 -0500 Subject: [PATCH] Add canopy client install script --- canopy_client_install.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 canopy_client_install.sh diff --git a/canopy_client_install.sh b/canopy_client_install.sh new file mode 100755 index 0000000..77d826e --- /dev/null +++ b/canopy_client_install.sh @@ -0,0 +1,25 @@ +#!/bin/sh +CANOPY_CLIENT_DIR=$(pwd) + +# trap errors +function err_fn() { + echo 'ERROR - aborting script.' + cd $CANOPY_CLIENT_DIR + trap - ERR +} +trap "err_fn; return" ERR + +# install python packages +pip install -r requirements.txt + +# setup chrony +sudo apt-get update +sudo apt-get install chrony +sudo cp chrony_canopy_client.service /lib/systemd/system +sudo cp chrony_canopy_client.conf /etc/chrony + +# make ros package +cd ../.. +catkin_make +. ./devel/setup.bash +cd $CANOPY_CLIENT_DIR