comparison 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
comparison
equal deleted inserted replaced
456:aa3f38d8a9b6 457:44e5c12ce165
1 #!/bin/sh
2 #
3
4 # set defaults unless variables are already set
5
6 . ./.bela_common || exit 1
7
8 usage()
9 {
10 THIS_SCRIPT=`basename "$0"`
11 echo "Usage: $THIS_SCRIPT [start] [stop] [startup] [nostartup] "
12 echo "This program controls Bela's IDE.
13 ./$THIS_SCRIPT start -- starts or restarts the IDE
14 ./$THIS_SCRIPT stop -- stops the IDE
15 ./$THIS_SCRIPT startup -- sets the IDE to start at boot
16 ./$THIS_SCRIPT nostartup -- disables the IDE at boot
17 "
18 }
19
20 MAKE_COMMAND="make --no-print-directory -C $BBB_BELA_HOME"
21 while [ -n $1 ]
22 do
23 case $1 in
24 start)
25 echo ssh $BBB_ADDRESS $MAKE_COMMAND idestart
26 ssh $BBB_ADDRESS $MAKE_COMMAND idestart
27 exit $?
28 ;;
29 stop)
30 ssh $BBB_ADDRESS $MAKE_COMMAND idestop
31 exit $?
32 ;;
33 startup)
34 ssh $BBB_ADDRESS $MAKE_COMMAND idestartup
35 exit $?
36 ;;
37 nostartup)
38 ssh $BBB_ADDRESS $MAKE_COMMAND idenostartup
39 exit $?
40 ;;
41 *)
42 usage
43 exit 1
44 ;;
45 esac
46 shift
47 done