# HG changeset patch # User Giulio Moro # Date 1466385645 -3600 # Node ID 44e5c12ce165ba036e7ce901c72174c8b1ea127a # Parent aa3f38d8a9b6ebf2728929732396c4caf737765a Added script to control IDE diff -r aa3f38d8a9b6 -r 44e5c12ce165 scripts/ide.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/ide.sh Mon Jun 20 02:20:45 2016 +0100 @@ -0,0 +1,47 @@ +#!/bin/sh +# + +# set defaults unless variables are already set + +. ./.bela_common || exit 1 + +usage() +{ + THIS_SCRIPT=`basename "$0"` + echo "Usage: $THIS_SCRIPT [start] [stop] [startup] [nostartup] " + echo "This program controls Bela's IDE. + ./$THIS_SCRIPT start -- starts or restarts the IDE + ./$THIS_SCRIPT stop -- stops the IDE + ./$THIS_SCRIPT startup -- sets the IDE to start at boot + ./$THIS_SCRIPT nostartup -- disables the IDE at boot + " +} + +MAKE_COMMAND="make --no-print-directory -C $BBB_BELA_HOME" +while [ -n $1 ] +do + case $1 in + start) + echo ssh $BBB_ADDRESS $MAKE_COMMAND idestart + ssh $BBB_ADDRESS $MAKE_COMMAND idestart + exit $? + ;; + stop) + ssh $BBB_ADDRESS $MAKE_COMMAND idestop + exit $? + ;; + startup) + ssh $BBB_ADDRESS $MAKE_COMMAND idestartup + exit $? + ;; + nostartup) + ssh $BBB_ADDRESS $MAKE_COMMAND idenostartup + exit $? + ;; + *) + usage + exit 1 + ;; + esac + shift +done