-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwombat_update.sh
executable file
·123 lines (96 loc) · 2.38 KB
/
wombat_update.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#!/bin/bash
FW_VERSION=26.0
echo " "
echo "Starting Wombat Update #$FW_VERSION"
echo "..."
HOME=$(pwd)
###############################
#
# update boot files
#
###############################
#remount root filesystem as read write
mount -o remount,rw /
###############################
#
# update packages
#
###############################
rm -r /usr/local/bin/botui
rm -r /usr/bin/botui
# libwallaby
echo "Updating libwallaby..."
sudo apt-get remove libwallaby -y
sudo dpkg -i pkgs/libwallaby.deb
# botui
echo "Updating botui..."
sudo apt-get remove botui -y
sudo dpkg -i pkgs/botui.deb
#Harrogate
#echo "Updating harrogate..."
#sudo rm -r /home/pi/harrogate
#sudo tar -C /home/pi -zxvf pkgs/harrogate.tar.gz
#sudo chmod 777 /home/pi/harrogate
#cd /home/pi/harrogate
#sudo npm install
#sudo killall node
#sudo gulp &
cd $HOME
###############################
#
# edit misc files
#
###############################
#sh file needed to start the botui
TARGET=files/zoobee_launcher.sh
echo "Copying the launcher"
cp $TARGET /home/root
cp $TARGET /home/root/harrogate
#Python file that starts the wifi access point
TARGET=files/wifi_configurator.py
echo "Copying the Wifi Configurator"
cp $TARGET /home/pi
cp $TARGET /home/pi/harrogate
cp $TARGET /usr/bin/
#Experimental python script that does managed wifi
TARGET=files/wifi_managed_configuration.py
echo "Copying Experimental Managed Wifi Configurator"
cp $TARGET /home/pi
cp $TARGET /home/pi/harrogate
cp $TARGET /usr/bin
#Copying the screen invert settings
TARGET=files/Screen_settings
cp -r $TARGET /home/root/got2/
#Copying the get serial Code
TARGET=files/wallaby_get_serial.sh
sudo cp $TARGET /usr/bin/
#Copying the set serial Code
TARGET=files/wallaby_set_serial.sh
sudo cp $TARGET /usr/bin/
#Copying the get Pi ID Code
TARGET=files/wallaby_get_id.sh
sudo cp $TARGET /usr/bin/
sudo chmod u+x /usr/bin/wifi_*
sudo chmod u+x /usr/bin/wallaby_*
echo "Permissions Granted."
#Copying the Backup Code
TARGET=files/Backup
sudo cp -r $TARGET /home/root/got2/
#Adding Default Programs
TARGET=Default_User
sudo cp -r $TARGET /home/root/Documents/KISS
#Copy the firmware
echo "Adding updated firmware files"
sudo cp -r files/flash/* /home/pi
echo "Flashing the Processor"
cd /home/pi
sudo ./wallaby_flash
###############################
#
# sync and reboot
#
###############################
echo "Finished Wombat Update #$FW_VERSION"
echo "Rebooting..."
sleep 3
reboot