comparison scripts/build_project.sh @ 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 4b3ae93ab102
children 276a8517da13
comparison
equal deleted inserted replaced
320:3a28a4eb948d 323:b99b8ab317dd
119 echo "Error while copying files" 119 echo "Error while copying files"
120 exit 120 exit
121 fi 121 fi
122 122
123 # Make new BeagleRT executable and run 123 # Make new BeagleRT executable and run
124 MAKE_COMMAND="make -C $BBB_BELA_HOME PROJECT='$BBB_PROJECT_NAME' CL='$COMMAND_ARGS'"
124 if [ $RUN_PROJECT -eq 0 ] 125 if [ $RUN_PROJECT -eq 0 ]
125 then 126 then
126 echo "Building project..." 127 echo "Building project..."
127 ssh $BBB_ADDRESS "make all -C $BBB_BELA_HOME PROJECT=$BBB_PROJECT_NAME" 128 ssh $BBB_ADDRESS "$MAKE_COMMAND"
128 else 129 else
129 echo "Building and running project..." 130 echo "Building and running project..."
130 131
131 if [ $RUN_WITHOUT_SCREEN -ne 0 ] 132 if [ $RUN_WITHOUT_SCREEN -ne 0 ]
132 then 133 then
133 ssh -t $BBB_ADDRESS "cd $BBB_BELA_HOME && make all && cd source && $BBB_PROJECT_FOLDER/$BBB_PROJECT_NAME $COMMAND_ARGS" 134 ssh -t $BBB_ADDRESS "$MAKE_COMMAND run"
134 elif [ $RUN_IN_FOREGROUND -eq 0 ] 135 elif [ $RUN_IN_FOREGROUND -eq 0 ]
135 then 136 then
136 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" 137 ssh $BBB_ADDRESS "$MAKE_COMMAND runscreen"
137 else 138 else
138 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" 139 ssh -t $BBB_ADDRESS "$MAKE_COMMAND runscreenfg"
139 fi 140 fi
140 fi 141 fi