diff --git a/upd_script/fetch.sh b/upd_script/fetch.sh index 1f45dbb..b2694bb 100755 --- a/upd_script/fetch.sh +++ b/upd_script/fetch.sh @@ -16,6 +16,7 @@ then brickpi_update=0 grovepi_update=0 arduberry_update=0 + pivotpi=0 while read -r line do echo "Text read from file: $line" @@ -27,6 +28,8 @@ then grovepi_update=1 elif [ "$line" == "Arduberry" ] ; then arduberry_update=1 + elif [ "$line" == "PivotPi" ] ; then + pivotpi_update=1 fi done < $robots_2_update else # if the file doesn't exist, update everything @@ -34,12 +37,12 @@ else # if the file doesn't exist, update everything brickpi_update=1 grovepi_update=1 arduberry_update=1 + pivotpi_update=1 fi -echo $gopigo_update -echo $brickpi_update -echo $grovepi_update -echo $arduberry_update +############################################### +# GOPIGO +############################################### if [ $gopigo_update == 1 ] ; then # GoPiGo Update @@ -85,6 +88,10 @@ else echo "----------" fi # end conditional statement on GOPIGO UPDATE +############################################### +# BRICKPI +############################################### + if [ $brickpi_update == 1 ] ; then # BrickPi Update @@ -156,6 +163,11 @@ else fi # end conditional statement on ARDUBERRY UPDATE +############################################### +# GROVEPI +############################################### + + if [ $grovepi_update == 1 ] ; then # GrovePi Update @@ -182,6 +194,40 @@ else echo "----------" fi # end conditional statement on GrovePi update +############################################### +# PIVOTPI +############################################### + + +if [ $pivotpi_update == 1 ] ; then + + pushd /home/pi + + # if Dexter folder doesn't exist, then create it + if [ ! -d "Dexter" ]; then + mkdir "Dexter" + fi + cd /home/pi/Dexter + + # if pivotpi folder doesn't exit then clone repo + if [ ! -d "PivotPi" ]; then + sudo git clone https://github.com/DexterInd/PivotPi.git + fi + + cd /home/pi/Dexter/PivotPi + sudo git fetch origin + sudo git reset --hard + sudo git merge origin/master + cd /home/pi/Dexter/PivotPi/Install + + sudo bash /home/pi/Dexter/PivotPi/Install/install.sh + + popd +else + echo "--> PivotPi **NOT** Updated" + echo "----------" +fi + # Install DexterEd Software echo "--> Install DexterEd Software" sudo rm -r /home/pi/Desktop/DexterEd @@ -216,6 +262,8 @@ sudo rm /home/pi/Desktop/Troubleshooting_Start.desktop sudo chmod +x /home/pi/Desktop/GoBox/Troubleshooting_GUI/install_troubleshooting_start.sh sudo sh /home/pi/Desktop/GoBox/Troubleshooting_GUI/install_troubleshooting_start.sh + + ######################################### # Install All Python Scripts diff --git a/upd_script/upd_scratch_softlinks.sh b/upd_script/upd_scratch_softlinks.sh index 0c7bfb8..2ab154d 100644 --- a/upd_script/upd_scratch_softlinks.sh +++ b/upd_script/upd_scratch_softlinks.sh @@ -6,7 +6,10 @@ ####################################################### # BrickPi link -[ ! -d /usr/share/scratch/Projects/BrickPi ] && sudo ln -s /home/pi/Desktop/BrickPi/Examples /usr/share/scratch/Projects/BrickPi +# there was a non-functional link for a while. Detect is the softlink is valid. +# If not get rid of it and redo it +[ ! "$(readlink /usr/share/scratch/Project/BrickPi)" -ef "/home/pi/Desktop/BrickPi_Scratch/Examples" ] && sudo rm -r /usr/share/scratch/Projects/BrickPi +[ ! -d /usr/share/scratch/Projects/BrickPi ] && sudo ln -s /home/pi/Desktop/BrickPi_Scratch/Examples /usr/share/scratch/Projects/BrickPi # GoPiGo link [ ! -d /usr/share/scratch/Projects/GoPiGo ] && sudo ln -s /home/pi/Desktop/GoPiGo/Software/Scratch/Examples /usr/share/scratch/Projects/GoPiGo @@ -14,4 +17,7 @@ # GrovePi Link [ ! -d /usr/share/scratch/Projects/GrovePi ] && sudo ln -s /home/pi/Desktop/GrovePi/Software/Scratch/Grove_Examples /usr/share/scratch/Projects/GrovePi +# PivotPi Link +[ ! -d /usr/share/scratch/Projects/PivotPi ] && sudo ln -s /home/pi/Dexter/PivotPi/Software/Scratch/Examples /usr/share/scratch/Projects/PivotPi + diff --git a/update_gui_elements/robots_2_update b/update_gui_elements/robots_2_update old mode 100644 new mode 100755 index 8cdf884..06e3daf --- a/update_gui_elements/robots_2_update +++ b/update_gui_elements/robots_2_update @@ -2,3 +2,4 @@ BrickPi GoPiGo GrovePi Arduberry +PivotPi