comparison scripts/setup_board.sh @ 83:eec746389e20

Fixed compatibility with sh in the script
author Giulio Moro <giuliomoro@yahoo.it>
date Fri, 17 Jul 2015 22:54:35 +0100
parents b89dd0c97a04
children 91e1a3a220d4
comparison
equal deleted inserted replaced
80:371386c4e22f 83:eec746389e20
38 SCRIPTPATH=$(readlink -f "$0") 38 SCRIPTPATH=$(readlink -f "$0")
39 SCRIPTDIR=$(dirname "$SCRIPTPATH") 39 SCRIPTDIR=$(dirname "$SCRIPTPATH")
40 40
41 read -p "Warning: this script will DELETE any existing BeagleRT files from your BeagleBone! Continue? " -n 1 -r 41 read -p "Warning: this script will DELETE any existing BeagleRT files from your BeagleBone! Continue? " -n 1 -r
42 echo 42 echo
43 if [[ $REPLY =~ ^[Yy]$ ]] 43 if [[ $REPLY = y ]]
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
57 fi 57 fi
58 # Make remaining directories needed for building 58 # Make remaining directories needed for building
59 echo "Creating directory structure on BeagleBone..." 59 echo "Creating directory structure on BeagleBone..."
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" &&\ 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" &&\
61 echo "Done." 61 echo "Done."
62 else
63 echo "Aborting..."
62 fi 64 fi
63 65