Mercurial > hg > beaglert
diff scripts/run_project.sh @ 58:3ffafa57302c newapi
Added scripts for building on board
author | andrewm |
---|---|
date | Wed, 15 Jul 2015 15:49:00 +0100 |
parents | |
children | ad6b2767beaf |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/run_project.sh Wed Jul 15 15:49:00 2015 +0100 @@ -0,0 +1,34 @@ +#!/bin/bash +# +# This script runs an already-compiled BeagleRT project on the +# BeagleBone Black. + +BBB_ADDRESS="root@192.168.7.2" +BBB_PATH="~/BeagleRT" + +function usage +{ + THIS_SCRIPT=`basename "$0"` + echo "Usage: $THIS_SCRIPT [-b path-on-beaglebone]" + + echo " + This script runs a previously compiled BeagleRT project on the + BeagleBone Black. The -b option changes the default path, which + is otherwise $BBB_PATH." +} + +OPTIND=1 + +while getopts "b:h" opt; do + case $opt in + b) BBB_PATH=$OPTARG + ;; + h|\?) usage + exit 1 + esac +done + +shift $((OPTIND-1)) + +echo "Running BeagleRT..." +ssh $BBB_ADDRESS "kill -s 2 \`pidof BeagleRT\` 2>/dev/null ; sleep 0.5 ; screen -d -m $BBB_PATH/BeagleRT" \ No newline at end of file