Mercurial > hg > beaglert
diff scripts/run_pd_libpd.sh @ 377:a430a16d2c02 prerelease
Updated scripts so that the Bela folder on the bbb is ~/Bela. Note: BeagleRT_startup.sh is still the same (because the reference to it needs to be changed in /etc/init.d/ ....
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Sat, 11 Jun 2016 01:54:43 +0100 |
parents | dca0ca81b685 |
children | 99de323c13b3 |
line wrap: on
line diff
--- a/scripts/run_pd_libpd.sh Fri Jun 10 00:56:49 2016 +0100 +++ b/scripts/run_pd_libpd.sh Sat Jun 11 01:54:43 2016 +0100 @@ -1,11 +1,11 @@ #!/bin/bash # -# This script compiles a BeagleRT project on the BeagleBone Black and +# This script compiles a Bela project on the BeagleBone Black and # optionally runs it. Pass a directory path in the first argument. # The source files in this directory are copied to the board and compiled. BBB_ADDRESS="root@192.168.7.2" -BBB_LIBPD_EXECUTABLE_PATH="~/libpd/BeagleRT" +BBB_LIBPD_EXECUTABLE_PATH="~/libpd/Bela" BBB_LIBPD_PROJECT_PATH="~/libpd/source/" RUN_PROJECT=1 COMMAND_ARGS= @@ -18,13 +18,13 @@ echo "Usage: $THIS_SCRIPT [-c command-line-args] [-nfF] <directory-with-source-files>" echo " This script copies a PureData project to the BeagleBone and runs it - using libpd. The BeagleRT-libpd executable should have first been copied + using libpd. The Bela-libpd executable should have first been copied to the $BBB_LIBPD_EXECUTABLE_PATH folder on the Beaglebone. The source directory should contain a file called _main.pd, which is the patch that will be loaded into Pd. All the content of the folder is recursively copied and the folder structure is flattened. If the argument -n is passed, the output will not be run after compiling. - The -c option passes command-line arguments to the BeagleRT program; + The -c option passes command-line arguments to the Bela program; enclose the argument string in quotes. The -f argument runs the project in the foreground of the current terminal, @@ -72,10 +72,10 @@ exit 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 ; rm -rf $BBB_LIBPD_PROJECT_PATH/; mkdir -p $BBB_LIBPD_PROJECT_PATH; " +# Stop Bela and clean out old source files +echo "Stopping Bela and removing old source files..." +ssh -t -t $BBB_ADDRESS "screen -X -S Bela quit &>/dev/null;\ + pkill Bela ; rm -rf $BBB_LIBPD_PROJECT_PATH/; mkdir -p $BBB_LIBPD_PROJECT_PATH; " # Copy new source files to the board echo "Copying new pd projects to BeagleBone..." @@ -87,7 +87,7 @@ exit fi -# Make new BeagleRT executable and run +# Make new Bela executable and run if [ $RUN_PROJECT -eq 0 ] then echo "Files copied. Run without \"-n\" to run the project" @@ -99,9 +99,9 @@ ssh -t $BBB_ADDRESS "cd $BBB_LIBPD_PROJECT_PATH && $BBB_LIBPD_EXECUTABLE_PATH $COMMAND_ARGS" elif [ $RUN_IN_FOREGROUND -eq 0 ] then - ssh $BBB_ADDRESS "cd $BBB_LIBPD_PROJECT_PATH && screen -S BeagleRT -d -m \ + ssh $BBB_ADDRESS "cd $BBB_LIBPD_PROJECT_PATH && screen -S Bela -d -m \ $BBB_LIBPD_EXECUTABLE_PATH $COMMAND_ARGS" else - ssh -t $BBB_ADDRESS "cd $BBB_LIBPD_PROJECT_PATH && screen -S BeagleRT $BBB_LIBPD_EXECUTABLE_PATH $COMMAND_ARGS" + ssh -t $BBB_ADDRESS "cd $BBB_LIBPD_PROJECT_PATH && screen -S Bela $BBB_LIBPD_EXECUTABLE_PATH $COMMAND_ARGS" fi -fi \ No newline at end of file +fi