annotate scripts/ide.sh @ 458:84841654c606 prerelease

update is a bit more clean through Makefile
author Giulio Moro <giuliomoro@yahoo.it>
date Mon, 20 Jun 2016 02:48:31 +0100
parents 44e5c12ce165
children d9a4fc5357e7
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 ssh $BBB_ADDRESS $MAKE_COMMAND idestart
giuliomoro@457 26 exit $?
giuliomoro@457 27 ;;
giuliomoro@457 28 stop)
giuliomoro@457 29 ssh $BBB_ADDRESS $MAKE_COMMAND idestop
giuliomoro@457 30 exit $?
giuliomoro@457 31 ;;
giuliomoro@457 32 startup)
giuliomoro@457 33 ssh $BBB_ADDRESS $MAKE_COMMAND idestartup
giuliomoro@457 34 exit $?
giuliomoro@457 35 ;;
giuliomoro@457 36 nostartup)
giuliomoro@457 37 ssh $BBB_ADDRESS $MAKE_COMMAND idenostartup
giuliomoro@457 38 exit $?
giuliomoro@457 39 ;;
giuliomoro@457 40 *)
giuliomoro@457 41 usage
giuliomoro@457 42 exit 1
giuliomoro@457 43 ;;
giuliomoro@457 44 esac
giuliomoro@457 45 shift
giuliomoro@457 46 done