comparison 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
comparison
equal deleted inserted replaced
57:72726dd4f66c 58:3ffafa57302c
1 #!/bin/bash
2 #
3 # This script runs an already-compiled BeagleRT project on the
4 # BeagleBone Black.
5
6 BBB_ADDRESS="root@192.168.7.2"
7 BBB_PATH="~/BeagleRT"
8
9 function usage
10 {
11 THIS_SCRIPT=`basename "$0"`
12 echo "Usage: $THIS_SCRIPT [-b path-on-beaglebone]"
13
14 echo "
15 This script runs a previously compiled BeagleRT project on the
16 BeagleBone Black. The -b option changes the default path, which
17 is otherwise $BBB_PATH."
18 }
19
20 OPTIND=1
21
22 while getopts "b:h" opt; do
23 case $opt in
24 b) BBB_PATH=$OPTARG
25 ;;
26 h|\?) usage
27 exit 1
28 esac
29 done
30
31 shift $((OPTIND-1))
32
33 echo "Running BeagleRT..."
34 ssh $BBB_ADDRESS "kill -s 2 \`pidof BeagleRT\` 2>/dev/null ; sleep 0.5 ; screen -d -m $BBB_PATH/BeagleRT"