-
Notifications
You must be signed in to change notification settings - Fork 17
/
swpi-update-dev.sh
51 lines (40 loc) · 986 Bytes
/
swpi-update-dev.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
#! /bin/bash
test=`awk '$4~/(^|,)ro($|,)/' /proc/mounts | grep /dev/root`
if [ -z "$test" ]
then
ro=0
else
ro=1
echo "Mounting in rw"
sudo mount / -o remount,rw
fi
sudo mount / -o remount,rw
cd /home/pi/swpi
sudo chown -R pi /home/pi/swpi
sudo chown pi ./DHT
sudo chown pi ./mcp3002
sudo chown pi ./TX23
sudo chown pi ./wh1080_rf
cd /home/pi/
wget http://www.vololiberomontecucco.it/swpi/swpi-src-dev.tar.gz
tar xvfz swpi-src-dev.tar.gz
rm swpi-src-dev.tar.gz
cd swpi
echo "Changing permissions"
sudo chmod +x ./usbreset
sudo chmod +x ./wifi_reset.sh
sudo chmod +x ./swpi.sh
sudo chmod +x ./swpi-update.sh
sudo chmod +x ./swpi-update-dev.sh
sudo chmod +x ./killswpi.sh
sudo chmod +x ./DHT/DHT
sudo chmod +x ./DHT/DHT_rf
sudo chmod +x ./wh1080_rf/wh1080_rf
sudo chmod +x ./wh1080_rf/spi_init
sudo chmod +x ./mcp3002/atod
sudo chmod +x ./mcp3002/libMCP3002.so
sudo chmod 755 ./swpi.py
if [ $ro = 1 ] ; then
echo "Mounting in ro"
sudo mount / -o remount,ro
fi