-
Notifications
You must be signed in to change notification settings - Fork 64
/
update.sh
36 lines (32 loc) · 828 Bytes
/
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
#!/bin/bash
if [ -e ./wio_link_git_clone ]
then
echo "Already cloned"
cd ./wio_link_git_clone/
else
echo "Now clone the repo..."
git clone https://github.com/Seeed-Studio/Wio_Link.git wio_link_git_clone
cd ./wio_link_git_clone/
git submodule init
fi
#git checkout dev
git pull
git submodule update
supervisorctl stop esp8266
if [ ! -d ../esp8266_iot_node ]
then
mkdir -p ../esp8266_iot_node
cd ../esp8266_iot_node
cp -rf ../wio_link_git_clone/* ./
rm -rf ./grove_drivers/grove_example
else
cd ../esp8266_iot_node
mv database.db database.db.bak
mv config.py config.py.bak
cp -rf ../wio_link_git_clone/* ./
mv database.db.bak database.db
mv config.py.bak config.py
rm -rf ./grove_drivers/grove_example
fi
python ./scan_drivers.py
supervisorctl start esp8266