comparison scripts/setup_board.sh @ 64:b89dd0c97a04 newapi

added Makefile, added default_main, added error checking in scripts
author Giulio Moro <giuliomoro@yahoo.it>
date Wed, 15 Jul 2015 19:59:29 +0100
parents 3ada83df91a5
children eec746389e20
comparison
equal deleted inserted replaced
63:3ada83df91a5 64:b89dd0c97a04
42 echo 42 echo
43 if [[ $REPLY =~ ^[Yy]$ ]] 43 if [[ $REPLY =~ ^[Yy]$ ]]
44 then 44 then
45 # Stop BeagleRT if running and remove all files 45 # Stop BeagleRT if running and remove all files
46 echo "Stopping BeagleRT and removing old files." 46 echo "Stopping BeagleRT and removing old files."
47 ssh $BBB_ADDRESS "screen -X -S BeagleRT quit ; pkill BeagleRT ; sleep 0.5 ; rm -rf $BBB_PATH ; mkdir $BBB_PATH" 47 ssh $BBB_ADDRESS "screen -X -S BeagleRT quit ; pkill BeagleRT; sleep 0.5 ; rm -rf $BBB_PATH ; mkdir $BBB_PATH"
48 48
49 # Copy relevant files to BeagleBone Black 49 # Copy relevant files to BeagleBone Black
50 echo "Copying new files to BeagleBone..." 50 echo "Copying new files to BeagleBone..."
51 scp -r $SCRIPTDIR/../core $SCRIPTDIR/../include $SCRIPTDIR/../Makefile $SCRIPTDIR/../libNE10.a $SCRIPTDIR/../libprussdrv.a $BBB_ADDRESS:$BBB_PATH 51 scp -r $SCRIPTDIR/../core $SCRIPTDIR/../include $SCRIPTDIR/../Makefile $SCRIPTDIR/../libNE10.a $SCRIPTDIR/../libprussdrv.a $BBB_ADDRESS:$BBB_PATH
52 52
53 if [ $? -ne 0 ]
54 then
55 echo "Error while copying files"
56 exit
57 fi
53 # Make remaining directories needed for building 58 # Make remaining directories needed for building
54 echo "Creating directory structure on BeagleBone..." 59 echo "Creating directory structure on BeagleBone..."
55 ssh $BBB_ADDRESS "mkdir $BBB_PATH/source ; mkdir $BBB_PATH/build ; mkdir $BBB_PATH/build/core ; mkdir $BBB_PATH/build/source" 60 ssh $BBB_ADDRESS "mkdir -p $BBB_PATH/source ; mkdir -p $BBB_PATH/build ; mkdir -p $BBB_PATH/build/core ; mkdir -p $BBB_PATH/build/source" &&\
56
57 echo "Done." 61 echo "Done."
58 fi 62 fi
59 63