changeset 261:f51132ee0080 prerelease

build_project.sh sets the date. screen name changed to 'Bela'
author Giulio Moro <giuliomoro@yahoo.it>
date Mon, 16 May 2016 14:50:18 +0100
parents afdddd5f189f
children b491eb027f82
files scripts/build_project.sh
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/build_project.sh	Mon May 16 14:32:21 2016 +0100
+++ b/scripts/build_project.sh	Mon May 16 14:50:18 2016 +0100
@@ -10,6 +10,7 @@
 COMMAND_ARGS=
 RUN_IN_FOREGROUND=0
 RUN_WITHOUT_SCREEN=0
+SCREEN_NAME=Bela
 
 function usage
 {
@@ -77,8 +78,9 @@
 fi
 
 # Stop BeagleRT and clean out old source files
-echo "Stopping BeagleRT and removing old source files..."
-ssh -t -t $BBB_ADDRESS "screen -X -S BeagleRT quit &>/dev/null; pkill BeagleRT ; make sourceclean -C $BBB_PATH"
+echo "Stopping running program..."
+# sets the date, stops the running process
+ssh $BBB_ADDRESS "date -s '`date`' > /dev/null; screen -X -S '"$SCREEN_NAME"' quit &>/dev/null;"
 
 #concatenate arguments to form path.
 BBB_SOURCE_PATH= #initially empty, will be filled with input arguments
@@ -117,8 +119,8 @@
 		ssh -t $BBB_ADDRESS "cd $BBB_PATH && make all && cd source && ../BeagleRT $COMMAND_ARGS"	
 	elif [ $RUN_IN_FOREGROUND -eq 0 ]
 	then
-	    ssh $BBB_ADDRESS "cd $BBB_PATH && make all && cd source && screen -S BeagleRT -d -m ../BeagleRT $COMMAND_ARGS"
+	    ssh $BBB_ADDRESS "cd $BBB_PATH && make all && cd source && screen -S $SCREEN_NAME -d -m ../BeagleRT $COMMAND_ARGS"
 	else
-	    ssh -t $BBB_ADDRESS "cd $BBB_PATH && make all && cd source && screen -S BeagleRT ../BeagleRT $COMMAND_ARGS"
+	    ssh -t $BBB_ADDRESS "cd $BBB_PATH && make all && cd source && screen -S $SCREEN_NAME ../BeagleRT $COMMAND_ARGS"
 	fi
 fi