annotate scripts/ide.sh @ 554:3b0c860ef209 prerelease

Merge
author Giulio Moro <giuliomoro@yahoo.it>
date Fri, 24 Jun 2016 17:14:24 +0100
parents d9a4fc5357e7
children
rev   line source
giuliomoro@457 1 #!/bin/sh
giuliomoro@457 2 #
giuliomoro@457 3
giuliomoro@457 4 # set defaults unless variables are already set
giuliomoro@457 5
giuliomoro@462 6 SCRIPTDIR=$(dirname "$0")
giuliomoro@462 7 [ -z $SCRIPTDIR ] && SCRIPTDIR="./" || SCRIPTDIR=$SCRIPTDIR/
giuliomoro@462 8 . $SCRIPTDIR.bela_common || { echo "You must be in Bela/scripts to run these scripts" | exit 1; }
giuliomoro@457 9
giuliomoro@457 10 usage()
giuliomoro@457 11 {
giuliomoro@457 12 THIS_SCRIPT=`basename "$0"`
giuliomoro@457 13 echo "Usage: $THIS_SCRIPT [start] [stop] [startup] [nostartup] "
giuliomoro@457 14 echo "This program controls Bela's IDE.
giuliomoro@457 15 ./$THIS_SCRIPT start -- starts or restarts the IDE
giuliomoro@457 16 ./$THIS_SCRIPT stop -- stops the IDE
giuliomoro@457 17 ./$THIS_SCRIPT startup -- sets the IDE to start at boot
giuliomoro@457 18 ./$THIS_SCRIPT nostartup -- disables the IDE at boot
giuliomoro@457 19 "
giuliomoro@457 20 }
giuliomoro@457 21
giuliomoro@457 22 MAKE_COMMAND="make --no-print-directory -C $BBB_BELA_HOME"
giuliomoro@457 23 while [ -n $1 ]
giuliomoro@457 24 do
giuliomoro@457 25 case $1 in
giuliomoro@457 26 start)
giuliomoro@457 27 ssh $BBB_ADDRESS $MAKE_COMMAND idestart
giuliomoro@457 28 exit $?
giuliomoro@457 29 ;;
giuliomoro@457 30 stop)
giuliomoro@457 31 ssh $BBB_ADDRESS $MAKE_COMMAND idestop
giuliomoro@457 32 exit $?
giuliomoro@457 33 ;;
giuliomoro@457 34 startup)
giuliomoro@457 35 ssh $BBB_ADDRESS $MAKE_COMMAND idestartup
giuliomoro@457 36 exit $?
giuliomoro@457 37 ;;
giuliomoro@457 38 nostartup)
giuliomoro@457 39 ssh $BBB_ADDRESS $MAKE_COMMAND idenostartup
giuliomoro@457 40 exit $?
giuliomoro@457 41 ;;
giuliomoro@457 42 *)
giuliomoro@457 43 usage
giuliomoro@457 44 exit 1
giuliomoro@457 45 ;;
giuliomoro@457 46 esac
giuliomoro@457 47 shift
giuliomoro@457 48 done