Skip to content

Commit

Permalink
ref RobertLucian#9 : feature - removed fetchers (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertLucian authored and johnisanerd committed Sep 28, 2017
1 parent f72b586 commit a7ed3e6
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 255 deletions.
32 changes: 3 additions & 29 deletions upd_script/fetch_arduberry.sh
Original file line number Diff line number Diff line change
@@ -1,29 +1,3 @@
PIHOME=/home/pi
DEXTER=Dexter
DEXTER_PATH=$PIHOME/$DEXTER
RASPBIAN=$PIHOME/di_update/Raspbian_For_Robots
curl --silent https://raw.githubusercontent.com/DexterInd/script_tools/master/install_script_tools.sh | bash

# needs to be sourced from here when we call this as a standalone
source /home/pi/$DEXTER/lib/$DEXTER/script_tools/functions_library.sh

delete_folder /home/pi/Desktop/ArduBerry # Delete the old location

# Check for a Arduberry directory under "Dexter" folder. If it doesn't exist, create it.
ARDUBERRY_DIR=$DEXTER_PATH/ArduBerry
if [ -d "$ARDUBERRY_DIR" ]; then
echo "Arduberry Directory Exists"
cd $ARDUBERRY_DIR # Go to directory
sudo git fetch origin # Hard reset the git files
sudo git reset --hard
sudo git merge origin/master
else
cd $DEXTER_PATH
git clone https://github.com/DexterInd/ArduBerry
cd ArduBerry
fi

#Arduberry does not have a update201612 branch

sudo chmod +x $ARDUBERRY_DIR/script/install.sh
sudo bash $ARDUBERRY_DIR/script/install.sh
# this file has been left in this place for legacy reasons
# when we're sure the fetcher works on the corresponding repo, then we'll remove this file
sudo curl -kL dexterindustries.com/update_arduberry | bash
42 changes: 3 additions & 39 deletions upd_script/fetch_brickpi+.sh
Original file line number Diff line number Diff line change
@@ -1,39 +1,3 @@
# This script updates the the code repos on Raspbian for Robots.

PIHOME=/home/pi
DEXTER=Dexter
DEXTER_PATH=$PIHOME/$DEXTER
RASPBIAN=$PIHOME/di_update/Raspbian_For_Robots
curl --silent https://raw.githubusercontent.com/DexterInd/script_tools/master/install_script_tools.sh | bash

# needs to be sourced from here when we call this as a standalone
source /home/pi/$DEXTER/lib/$DEXTER/script_tools/functions_library.sh

# BrickPi+ Update
feedback "--> Start BrickPi Update."
feedback "##############################"
delete_folder /home/pi/Desktop/BrickPi # Delete the old location
# Check for a BrickPi directory under "Dexter" folder. If it doesn't exist, create it.
BRICKPI_DIR=$DEXTER_PATH/BrickPi+
if [ -d "$BRICKPI_DIR" ]; then
echo "BrickPi Directory Exists"
cd $DEXTER_PATH/BrickPi+ # Go to directory
sudo git fetch origin # Hard reset the git files
sudo git reset --hard
sudo git merge origin/master
else
cd $DEXTER_PATH
# the dot at the end is important to avoid a BrickPi+/BrickPi folder structure
git clone https://github.com/DexterInd/BrickPi BrickPi+
cd $DEXTER_PATH/BrickPi+
fi
change_branch $BRANCH

# BrickPi_Python Update
delete_folder /home/pi/Desktop/BrickPi_Python # Delete the old location
delete_folder /home/pi/Desktop/BrickPi_C
delete_folder /home/pi/Desktop/BrickPi_Scratch

sudo bash $DEXTER_PATH/BrickPi+/Setup_Files/install.sh


# this file has been left in this place for legacy reasons
# when we're sure the fetcher works on the corresponding repo, then we'll remove this file
sudo curl -kL dexterindustries.com/update_brickpi_plus | bash
29 changes: 3 additions & 26 deletions upd_script/fetch_brickpi3.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
# Check for a BrickPi directory under "Dexter" folder. If it doesn't exist, create it.
PIHOME=/home/pi
DEXTER=Dexter
DEXTER_PATH=$PIHOME/$DEXTER
RASPBIAN=$PIHOME/di_update/Raspbian_For_Robots
curl --silent https://raw.githubusercontent.com/DexterInd/script_tools/master/install_script_tools.sh | bash

# needs to be sourced from here when we call this as a standalone
source /home/pi/$DEXTER/lib/$DEXTER/script_tools/functions_library.sh

BRICKPI3_DIR=$DEXTER_PATH/BrickPi3
if folder_exists "$BRICKPI3_DIR" ; then
echo "BrickPi3 Directory Exists"
cd $DEXTER_PATH/BrickPi3 # Go to directory
sudo git fetch origin # Hard reset the git files
sudo git reset --hard
sudo git merge origin/master
# change_branch $BRANCH
else
cd $DEXTER_PATH
git clone https://github.com/DexterInd/BrickPi3
cd BrickPi3
# change_branch $BRANCH # change to a branch we're working on, if we've defined the branch above.
fi

sudo bash /home/pi/Dexter/BrickPi3/Install/install.sh
# this file has been left in this place for legacy reasons
# when we're sure the fetcher works on the corresponding repo, then we'll remove this file
sudo curl -kL dexterindustries.com/update_brickpi3 | bash
38 changes: 3 additions & 35 deletions upd_script/fetch_gopigo.sh
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
#####################################################################
#####################################################################
# FETCH GOPIGO FOLDERS
# SCRIPT MAY BE RUN ON ITS OWN
#####################################################################
#####################################################################
PIHOME=/home/pi
DEXTER=Dexter
DEXTER_PATH=$PIHOME/$DEXTER
RASPBIAN=$PIHOME/di_update/Raspbian_For_Robots
curl --silent https://raw.githubusercontent.com/DexterInd/script_tools/master/install_script_tools.sh | bash

# needs to be sourced from here when we call this as a standalone
source $PIHOME/$DEXTER/lib/$DEXTER/script_tools/functions_library.sh

# Check for a GoPiGo directory. If it doesn't exist, create it.
GOPIGO_DIR=$DEXTER_PATH/GoPiGo
if folder_exists $GOPIGO_DIR; then
echo "GoPiGo Directory Exists"
cd $DEXTER_PATH/GoPiGo # Go to directory
sudo git fetch origin # Hard reset the git files
sudo git reset --hard
sudo git merge origin/master
else
cd $DEXTER_PATH
git clone https://github.com/DexterInd/GoPiGo
cd $DEXTER_PATH/GoPiGo
fi
change_branch $BRANCH # change to a branch we're working on.

pushd $DEXTER_PATH/GoPiGo/Setup > /dev/null
feedback "--> UPDATING LIBRARIES"
feedback "------------------"
sudo bash ./install.sh
popd > /dev/null
# this file has been left in this place for legacy reasons
# when we're sure the fetcher works on the corresponding repo, then we'll remove this file
sudo curl -kL dexterindustries.com/update_gopigo | bash
29 changes: 3 additions & 26 deletions upd_script/fetch_gopigo3.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
# Check for a GoPiGo3 directory under "Dexter" folder. If it doesn't exist, create it.
PIHOME=/home/pi
DEXTER=Dexter
DEXTER_PATH=$PIHOME/$DEXTER
RASPBIAN=$PIHOME/di_update/Raspbian_For_Robots
curl --silent https://raw.githubusercontent.com/DexterInd/script_tools/master/install_script_tools.sh | bash

# needs to be sourced from here when we call this as a standalone
source /home/pi/$DEXTER/lib/$DEXTER/script_tools/functions_library.sh

GOPIGO3_DIR=$DEXTER_PATH/GoPiGo3
if folder_exists "$GOPIGO3_DIR" ; then
echo "GoPiGo3 Directory Exists"
cd $DEXTER_PATH/GoPiGo3 # Go to directory
sudo git fetch origin # Hard reset the git files
sudo git reset --hard
sudo git merge origin/master
# change_branch $BRANCH
else
cd $DEXTER_PATH
git clone https://github.com/DexterInd/GoPiGo3
cd GoPiGo3
# change_branch $BRANCH # change to a branch we're working on, if we've defined the branch above.
fi

sudo bash /home/pi/Dexter/GoPiGo3/Install/install.sh
# this file has been left in this place for legacy reasons
# when we're sure the fetcher works on the corresponding repo, then we'll remove this file
sudo curl -kL dexterindustries.com/update_gopigo3 | bash
41 changes: 3 additions & 38 deletions upd_script/fetch_grovepi.sh
Original file line number Diff line number Diff line change
@@ -1,38 +1,3 @@
# This script updates the the code repos on Raspbian for Robots.

# definitions needed for standalone call
PIHOME=/home/pi
DEXTER=Dexter
DEXTER_PATH=$PIHOME/$DEXTER
RASPBIAN=$PIHOME/di_update/Raspbian_For_Robots
curl --silent https://raw.githubusercontent.com/DexterInd/script_tools/master/install_script_tools.sh | bash

# needs to be sourced from here when we call this as a standalone
source /home/pi/$DEXTER/lib/$DEXTER/script_tools/functions_library.sh

GROVEPI_DIR=$DEXTER_PATH/GrovePi

# Check for a GrovePi directory under "Dexter" folder. If it doesn't exist, create it.

if [ -d "$GROVEPI_DIR" ]; then
echo "GrovePi Directory Exists"
cd $GROVEPI_DIR # Go to directory
sudo git fetch origin # Hard reset the git files
sudo git reset --hard
sudo git merge origin/master
else
echo "Cloning"
cd $PIHOME/$DEXTER/
git clone https://github.com/DexterInd/GrovePi
cd GrovePi
fi

change_branch $BRANCH # Change to a branch we're working on in the GrovePi Directory.
# Variable $BRANCH comes from /upd_script/fetch.sh

feedback "--> Start GrovePi update install."
feedback "---------------------------------"
pushd $PIHOME/$DEXTER/GrovePi/Script > /dev/null
sudo chmod +x install.sh
sudo bash ./install.sh
popd > /dev/null
# this file has been left in this place for legacy reasons
# when we're sure the fetcher works on the corresponding repo, then we'll remove this file
sudo curl -kL dexterindustries.com/update_grovepi | bash
28 changes: 3 additions & 25 deletions upd_script/fetch_pivotpi.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
PIHOME=/home/pi
DEXTER=Dexter
DEXTER_PATH=$PIHOME/$DEXTER
RASPBIAN=$PIHOME/di_update/Raspbian_For_Robots
curl --silent https://raw.githubusercontent.com/DexterInd/script_tools/master/install_script_tools.sh | bash

# needs to be sourced from here when we call this as a standalone
source /home/pi/$DEXTER/lib/$DEXTER/script_tools/functions_library.sh

pushd $DEXTER_PATH > /dev/null

# if pivotpi folder doesn't exit then clone repo
if [ ! -d "PivotPi" ]; then
sudo git clone https://github.com/DexterInd/PivotPi.git
else
cd $DEXTER_PATH/PivotPi
sudo git fetch origin
sudo git reset --hard
sudo git merge origin/master
fi
#change_branch $BRANCH

sudo bash $DEXTER_PATH/PivotPi/Install/install.sh

popd > /dev/null
# this file has been left in this place for legacy reasons
# when we're sure the fetcher works on the corresponding repo, then we'll remove this file
sudo curl -kL dexterindustries.com/update_pivotpi | bash
40 changes: 3 additions & 37 deletions upd_script/fetch_sensors.sh
Original file line number Diff line number Diff line change
@@ -1,37 +1,3 @@
PIHOME=/home/pi
DEXTER=Dexter
DEXTER_PATH=$PIHOME/$DEXTER
RASPBIAN=$PIHOME/di_update/Raspbian_For_Robots
curl --silent https://raw.githubusercontent.com/DexterInd/script_tools/master/install_script_tools.sh | bash

# needs to be sourced from here when we call this as a standalone
source /home/pi/$DEXTER/lib/$DEXTER/script_tools/functions_library.sh

###############################################
## Install DI_Sensors
###############################################
SENSOR_DIR=$DEXTER_PATH/DI_Sensors
if folder_exists "$SENSOR_DIR" ; then
echo "DI_Sensors Directory Exists"
pushd $DEXTER_PATH/DI_Sensors # Go to directory
sudo git fetch origin # Hard reset the git files
sudo git reset --hard
sudo git merge origin/master
popd

else
pushd $DEXTER_PATH
git clone https://github.com/DexterInd/DI_Sensors
popd

fi

pushd $SENSOR_DIR/Python
sudo python setup.py install
sudo python3 setup.py install
popd

pushd $SENSOR_DIR/Python/di_sensors/DHT_Sensor
sudo python setup.py install
sudo python3 setup.py install
popd
# this file has been left in this place for legacy reasons
# when we're sure the fetcher works on the corresponding repo, then we'll remove this file
sudo curl -kL dexterindustries.com/update_sensors | bash

0 comments on commit a7ed3e6

Please sign in to comment.