changeset 323:b99b8ab317dd prerelease

Using make commands within build_project.sh instead of explicit command lines
author Giulio Moro <giuliomoro@yahoo.it>
date Thu, 02 Jun 2016 02:15:40 +0100
parents 3a28a4eb948d
children 9151fe15c194
files scripts/build_project.sh
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/build_project.sh	Mon May 30 01:21:14 2016 +0100
+++ b/scripts/build_project.sh	Thu Jun 02 02:15:40 2016 +0100
@@ -121,20 +121,21 @@
 fi
 
 # Make new BeagleRT executable and run
+MAKE_COMMAND="make -C $BBB_BELA_HOME PROJECT='$BBB_PROJECT_NAME' CL='$COMMAND_ARGS'"
 if [ $RUN_PROJECT -eq 0 ]
 then
     echo "Building project..."
-    ssh $BBB_ADDRESS "make all -C $BBB_BELA_HOME PROJECT=$BBB_PROJECT_NAME"
+    ssh $BBB_ADDRESS "$MAKE_COMMAND"
 else
     echo "Building and running project..."
 	
 	if [ $RUN_WITHOUT_SCREEN -ne 0 ]
 	then
-		ssh -t $BBB_ADDRESS "cd $BBB_BELA_HOME && make all && cd source && $BBB_PROJECT_FOLDER/$BBB_PROJECT_NAME $COMMAND_ARGS"	
+		ssh -t $BBB_ADDRESS "$MAKE_COMMAND run"	
 	elif [ $RUN_IN_FOREGROUND -eq 0 ]
 	then
-	    ssh $BBB_ADDRESS "cd $BBB_BELA_HOME && make all PROJECT=$BBB_PROJECT_NAME && cd source && screen -S $BBB_SCREEN_NAME -d -m $BBB_PROJECT_FOLDER/$BBB_PROJECT_NAME $COMMAND_ARGS"
+	    ssh $BBB_ADDRESS "$MAKE_COMMAND runscreen"
 	else
-	    ssh -t $BBB_ADDRESS "cd $BBB_BELA_HOME && make all PROJECT=$BBB_PROJECT_NAME && cd source && screen -S $BBB_SCREEN_NAME $BBB_PROJECT_FOLDER/$BBB_PROJECT_NAME $COMMAND_ARGS"
+	    ssh -t $BBB_ADDRESS "$MAKE_COMMAND runscreenfg"
 	fi
 fi