forked from DexterInd/GoPiGo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_gopigo.sh
More file actions
29 lines (26 loc) · 992 Bytes
/
update_gopigo.sh
File metadata and controls
29 lines (26 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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 "------------------"
bash ./install.sh
popd > /dev/null