forked from DexterInd/Raspbian_For_Robots
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fetch.sh
60 lines (49 loc) · 2.95 KB
/
fetch.sh
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#! /bin/bash
echo "Update"
echo "This is a crossover for updating Dexter Industries Raspbian for Robots."
echo "This should update the 2015.03.20 image to the 2015.10 image."
echo "The only time you would run this is if you have an old version of the image. This will update it to the latest version."
##############################################################################################################
# This is a crossover version for update. This should update the 2015.03.20 image to the 2015.10 image.
##############################################################################################################
# 1. Update the Source Files. Pull the Raspbian for robots Github repo and put it in a subdirectory of pi.
# Get the latest update information.
# If the directory exists, delete it.
if [ -d /home/pi/di_update ] ; then
sudo rm -r /home/pi/di_update
fi
# Make the directory again. Clone into it.
mkdir /home/pi/di_update
cd /home/pi/di_update
sudo git clone https://github.com/DexterInd/Raspbian_For_Robots/
cd Raspbian_For_Robots
cd /home/pi/di_update/Raspbian_For_Robots/
echo "Install wxpython tools"
sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n --force-yes # Install wx for python for windows / GUI programs.
sudo apt-get install python-psutil --force-yes
# Took this part out, it was for staging.
# git checkout update201507
# Make files executable.
echo "MAKE FILES EXECUTABLE."
echo "=============================="
sudo chmod +x /home/pi/di_update/Raspbian_For_Robots/update_master.sh
sudo chmod +x /home/pi/di_update/Raspbian_For_Robots/upd_script/update_all.sh
sudo chmod +x /home/pi/di_update/Raspbian_For_Robots/raspbian_for_robots_update.py
sudo rm /home/pi/Desktop/upd_start.desktop
sudo zenity --info --text="ALERT! \n This update will change your \n hostname from raspberrypi to dex. \n To logon, use dex.local or [email protected] \n after this update is complete.";
echo " █████╗ ██╗ ███████╗██████╗ ████████╗";
echo "██╔══██╗██║ ██╔════╝██╔══██╗╚══██╔══╝";
echo "███████║██║ █████╗ ██████╔╝ ██║ ";
echo "██╔══██║██║ ██╔══╝ ██╔══██╗ ██║ ";
echo "██║ ██║███████╗███████╗██║ ██║ ██║ ";
echo "╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝ ";
echo " ";
echo "VERY IMPORTANT TO NOTE: ";
echo "This will change your hostname from";
echo "raspberrypi to dex";
echo "To logon, use [email protected]";
echo "Press Enter to continue."
read
# Run the update master program.
sudo sh /home/pi/di_update/Raspbian_For_Robots/update_master.sh
sudo sh /home/pi/di_update/Raspbian_For_Robots/upd_script/update_all.sh