-
Notifications
You must be signed in to change notification settings - Fork 0
/
pull_update.sh
30 lines (25 loc) · 907 Bytes
/
pull_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
#!/bin/bash
#wordclock update python files script
echo "deleting old files if existent"
cd /home/pi
if [ -d wordclock]; then
sudo rm -r wordclock
fi
mkdir -m 777 /home/pi/wordclock
echo "Updating python files from github..."
echo "downloading new files..."
cd
cd /home/pi/wordclock
sudo bash -c "curl -o changeToWifi.sh https://raw.githubusercontent.com/S-A-M-J/wordclock/main/changeToWifi.sh"
sudo bash -c "curl -o changeToAp.sh https://raw.githubusercontent.com/S-A-M-J/wordclock/main/changeToAp.sh"
sudo bash -c "curl -o wordclock.py https://raw.githubusercontent.com/S-A-M-J/wordclock/main/wordclock.py"
cd
echo "downloading flow file..."
cd /home/pi/.node-red
sudo rm flows.json
cd
sudo bash -c "curl -o flows.json https://raw.githubusercontent.com/S-A-M-J/wordclock/main/node-red-flows-wordclock.json"
sudo touch flows.json
sudo mv flows.json /home/pi/.node-red/flows.json
cd
node-red-restart