Mercurial > hg > beaglert
changeset 402:c29f07b7350e prerelease
Quieter setup_board.sh, also invokes IDE setup if available
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Wed, 15 Jun 2016 02:21:13 +0100 |
parents | 00c3bbea4faf |
children | 83e1acf38d35 |
files | scripts/setup_board.sh |
diffstat | 1 files changed, 15 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/setup_board.sh Wed Jun 15 02:04:23 2016 +0100 +++ b/scripts/setup_board.sh Wed Jun 15 02:21:13 2016 +0100 @@ -6,7 +6,6 @@ [ -z "$BBB_ADDRESS" ] && BBB_ADDRESS="root@192.168.7.2" [ -z "$BBB_BELA_HOME" ] && BBB_BELA_HOME="~/Bela/" - function usage { THIS_SCRIPT=`basename "$0"` @@ -37,6 +36,7 @@ # Find location of this script so we can locate the rest of the files SCRIPTPATH=$(readlink "$0") SCRIPTDIR=$(dirname "$SCRIPTPATH") +[ -z "$IDE_FOLDER" ] && IDE_FOLDER=$SCRIPTDIR/../bela-ide/ read -p "Warning: this script will DELETE any existing Bela files from your BeagleBone! Continue? (y/N) " -r echo @@ -48,18 +48,29 @@ # Copy relevant files to BeagleBone Black echo "Copying new files to BeagleBone..." - scp -r $SCRIPTDIR/../core $SCRIPTDIR/../include $SCRIPTDIR/../Makefile $SCRIPTDIR/../libNE10.a $SCRIPTDIR/../libprussdrv.a $SCRIPTDIR/../examples $BBB_ADDRESS:$BBB_BELA_HOME &&\ - scp $SCRIPTDIR/../libpd.so $BBB_ADDRESS:/usr/lib + scp -q -r $SCRIPTDIR/../core $SCRIPTDIR/../include $SCRIPTDIR/../Makefile $SCRIPTDIR/../libNE10.a $SCRIPTDIR/../libprussdrv.a $SCRIPTDIR/../examples $BBB_ADDRESS:$BBB_BELA_HOME &&\ + scp -q $SCRIPTDIR/../libpd.so $BBB_ADDRESS:/usr/lib if [ $? -ne 0 ] then echo "Error while copying files" exit fi -# Make remaining directories needed for building +# Create remaining directories needed for building echo "Creating directory structure on BeagleBone..." ssh $BBB_ADDRESS "mkdir -p $BBB_BELA_HOME/build ; mkdir -p $BBB_BELA_HOME/build/core ; mkdir -p $BBB_BELA_HOME/build/projects; mkdir -p $BBB_BELA_HOME/projects" &&\ echo "Done." else echo "Aborting..." + exit fi +#------------- +#Installing IDE +stat $IDE_FOLDER/scripts/setup_IDE.sh > /dev/null +if [ $? -eq 0 ] +then + cd $IDE_FOLDER/scripts; + ./setup_IDE.sh +else + echo "No IDE found, no IDE installed. You can get a copy of the IDE files from https://github.com/LBDonovan/bela-ide" +fi;