if you create a file in /opt/Bela/local/bela_startup.sh
and make it executable, it will be run on boot with the following environment variables set:
PROJECT
the project name
ARGS
the command-line arguments to pass to the project at runtime.
Keeping in mind that the project's folder is /root/Bela/projects/$PROJECT
and the project's executable file is $PROJECT
in that folder, if you put the following into /opt/Bela/local/bela_startup.sh
:
#!/bin/bash
cd /root/Bela/projects/$PROJECT
./$PROJECT $ARGS
and make it executable with chmod +x /opt/Bela/local/bela_startup.sh
, then all that will happen at boot is that the program will be executed without trying to build it. This means that you can remove any source files after building it and it will still run.