From e468fee185fac42b2b04f656cbb98e8e9b5c7e94 Mon Sep 17 00:00:00 2001 From: cleoqc Date: Wed, 23 Nov 2016 15:15:12 +0000 Subject: [PATCH 1/5] add pivotpi to the list of robots to update --- update_gui_elements/robots_2_update | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 update_gui_elements/robots_2_update 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 From 7ef80a26669784a304e0fddae185cba951fd23d8 Mon Sep 17 00:00:00 2001 From: cleoqc Date: Thu, 24 Nov 2016 17:48:32 +0000 Subject: [PATCH 2/5] support pivotpi --- upd_script/fetch.sh | 56 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 4 deletions(-) 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 From ace4dd267b56f2ef61bb31c1d9bf1c87415044b0 Mon Sep 17 00:00:00 2001 From: cleoqc Date: Thu, 24 Nov 2016 20:54:29 +0000 Subject: [PATCH 3/5] set softlinks for Scratch examples --- upd_script/upd_scratch_softlinks.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/upd_script/upd_scratch_softlinks.sh b/upd_script/upd_scratch_softlinks.sh index 0c7bfb8..d77f3a5 100644 --- a/upd_script/upd_scratch_softlinks.sh +++ b/upd_script/upd_scratch_softlinks.sh @@ -6,7 +6,9 @@ ####################################################### # BrickPi link -[ ! -d /usr/share/scratch/Projects/BrickPi ] && sudo ln -s /home/pi/Desktop/BrickPi/Examples /usr/share/scratch/Projects/BrickPi + +[ ! "$(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 From b5fefdfcd4ca7071a6d47c11c3d5ce92c298e9be Mon Sep 17 00:00:00 2001 From: cleoqc Date: Thu, 24 Nov 2016 20:56:06 +0000 Subject: [PATCH 4/5] comment the changes --- upd_script/upd_scratch_softlinks.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/upd_script/upd_scratch_softlinks.sh b/upd_script/upd_scratch_softlinks.sh index d77f3a5..6004220 100644 --- a/upd_script/upd_scratch_softlinks.sh +++ b/upd_script/upd_scratch_softlinks.sh @@ -6,7 +6,8 @@ ####################################################### # BrickPi link - +# 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 From b5cbc323ac95d7969e1a836ef2bccc96529cbd04 Mon Sep 17 00:00:00 2001 From: cleoqc Date: Thu, 24 Nov 2016 20:57:42 +0000 Subject: [PATCH 5/5] Add PivotPi softlinks --- upd_script/upd_scratch_softlinks.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/upd_script/upd_scratch_softlinks.sh b/upd_script/upd_scratch_softlinks.sh index 6004220..2ab154d 100644 --- a/upd_script/upd_scratch_softlinks.sh +++ b/upd_script/upd_scratch_softlinks.sh @@ -17,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 +