Skip to content

Commit

Permalink
Merge pull request #74 from CleoQc/pivotpi
Browse files Browse the repository at this point in the history
Pivotpi
  • Loading branch information
Dexter Industries committed Nov 25, 2016
2 parents c9ead17 + b5cbc32 commit 3a8a44b
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 5 deletions.
56 changes: 52 additions & 4 deletions upd_script/fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -27,19 +28,21 @@ 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
gopigo_update=1
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
Expand Down Expand Up @@ -85,6 +88,10 @@ else
echo "----------"
fi # end conditional statement on GOPIGO UPDATE

###############################################
# BRICKPI
###############################################

if [ $brickpi_update == 1 ] ; then

# BrickPi Update
Expand Down Expand Up @@ -156,6 +163,11 @@ else
fi
# end conditional statement on ARDUBERRY UPDATE

###############################################
# GROVEPI
###############################################


if [ $grovepi_update == 1 ] ; then

# GrovePi Update
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
8 changes: 7 additions & 1 deletion upd_script/upd_scratch_softlinks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@
#######################################################

# 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

# 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


1 change: 1 addition & 0 deletions update_gui_elements/robots_2_update
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ BrickPi
GoPiGo
GrovePi
Arduberry
PivotPi

0 comments on commit 3a8a44b

Please sign in to comment.