annotate scripts/ide.sh @ 457:44e5c12ce165 prerelease

Added script to control IDE
author Giulio Moro <giuliomoro@yahoo.it>
date Mon, 20 Jun 2016 02:20:45 +0100
parents
children 84841654c606
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@457 6 . ./.bela_common || exit 1
giuliomoro@457 7
giuliomoro@457 8 usage()
giuliomoro@457 9 {
giuliomoro@457 10 THIS_SCRIPT=`basename "$0"`
giuliomoro@457 11 echo "Usage: $THIS_SCRIPT [start] [stop] [startup] [nostartup] "
giuliomoro@457 12 echo "This program controls Bela's IDE.
giuliomoro@457 13 ./$THIS_SCRIPT start -- starts or restarts the IDE
giuliomoro@457 14 ./$THIS_SCRIPT stop -- stops the IDE
giuliomoro@457 15 ./$THIS_SCRIPT startup -- sets the IDE to start at boot
giuliomoro@457 16 ./$THIS_SCRIPT nostartup -- disables the IDE at boot
giuliomoro@457 17 "
giuliomoro@457 18 }
giuliomoro@457 19
giuliomoro@457 20 MAKE_COMMAND="make --no-print-directory -C $BBB_BELA_HOME"
giuliomoro@457 21 while [ -n $1 ]
giuliomoro@457 22 do
giuliomoro@457 23 case $1 in
giuliomoro@457 24 start)
giuliomoro@457 25 echo ssh $BBB_ADDRESS $MAKE_COMMAND idestart
giuliomoro@457 26 ssh $BBB_ADDRESS $MAKE_COMMAND idestart
giuliomoro@457 27 exit $?
giuliomoro@457 28 ;;
giuliomoro@457 29 stop)
giuliomoro@457 30 ssh $BBB_ADDRESS $MAKE_COMMAND idestop
giuliomoro@457 31 exit $?
giuliomoro@457 32 ;;
giuliomoro@457 33 startup)
giuliomoro@457 34 ssh $BBB_ADDRESS $MAKE_COMMAND idestartup
giuliomoro@457 35 exit $?
giuliomoro@457 36 ;;
giuliomoro@457 37 nostartup)
giuliomoro@457 38 ssh $BBB_ADDRESS $MAKE_COMMAND idenostartup
giuliomoro@457 39 exit $?
giuliomoro@457 40 ;;
giuliomoro@457 41 *)
giuliomoro@457 42 usage
giuliomoro@457 43 exit 1
giuliomoro@457 44 ;;
giuliomoro@457 45 esac
giuliomoro@457 46 shift
giuliomoro@457 47 done