forked from supergreenlab/SuperGreenOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshoot_firmwares.sh
executable file
·69 lines (61 loc) · 3.55 KB
/
shoot_firmwares.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
#!/bin/bash
set -e
SKIP_APP="0"
if [ $# -eq "1" ]; then
SKIP_APP="$1"
fi
./update_config.sh config_gen/config/SuperGreenOS/Solo config.solo.json
./update_templates.sh config.solo.json
./update_htmlapp.sh config.solo.json
./update_firmware.sh SoloV2.1Testing
if [ $SKIP_APP -eq "0" ]; then
last_timestamp=$(cat ./releases/SoloV2.1Testing/last_timestamp)
cp -r ./releases/SoloV2.1Testing/$last_timestamp/html_app ../SuperGreenApp2/assets/firmware/SoloV2.1/
cp ./releases/SoloV2.1Testing/$last_timestamp/firmware.bin ../SuperGreenApp2/assets/firmware/SoloV2.1/
cp ./releases/SoloV2.1Testing/$last_timestamp/timestamp ../SuperGreenApp2/assets/firmware/SoloV2.1/
cp -r ./releases/SoloV2.1Testing ../backend/SuperGreenCloud/www/update/
fi
./update_config.sh config_gen/config/SuperGreenOS/Pickle config.pickle.json
./update_templates.sh config.pickle.json
./update_htmlapp.sh config.pickle.json
./update_firmware.sh PickleV2.1Testing
if [ $SKIP_APP -eq "0" ]; then
last_timestamp=$(cat ./releases/PickleV2.1Testing/last_timestamp)
cp -r ./releases/PickleV2.1Testing/$last_timestamp/html_app ../SuperGreenApp2/assets/firmware/PickleV2.1/
cp ./releases/PickleV2.1Testing/$last_timestamp/firmware.bin ../SuperGreenApp2/assets/firmware/PickleV2.1/
cp ./releases/PickleV2.1Testing/$last_timestamp/timestamp ../SuperGreenApp2/assets/firmware/PickleV2.1/
cp -r ./releases/PickleV2.1Testing ../backend/SuperGreenCloud/www/update/
fi
./update_config.sh config_gen/config/SuperGreenOS/Driver config.driver.json
./update_templates.sh config.driver.json
./update_htmlapp.sh config.driver.json
./update_firmware.sh DriverV2.1Testing
if [ $SKIP_APP -eq "0" ]; then
last_timestamp=$(cat ./releases/DriverV2.1Testing/last_timestamp)
cp -r ./releases/DriverV2.1Testing/$last_timestamp/html_app ../SuperGreenApp2/assets/firmware/DriverV2.1/
cp ./releases/DriverV2.1Testing/$last_timestamp/firmware.bin ../SuperGreenApp2/assets/firmware/DriverV2.1/
cp ./releases/DriverV2.1Testing/$last_timestamp/timestamp ../SuperGreenApp2/assets/firmware/DriverV2.1/
cp -r ./releases/DriverV2.1Testing ../backend/SuperGreenCloud/www/update/
fi
./update_config.sh config_gen/config/SuperGreenOS/Controller/v2.1 config.controller.json
./update_templates.sh config.controller.json
./update_htmlapp.sh config.controller.json
./update_firmware.sh ControllerV2.1Testing
if [ $SKIP_APP -eq "0" ]; then
last_timestamp=$(cat ./releases/ControllerV2.1Testing/last_timestamp)
cp -r ./releases/ControllerV2.1Testing/$last_timestamp/html_app ../SuperGreenApp2/assets/firmware/ControllerV2.1/
cp ./releases/ControllerV2.1Testing/$last_timestamp/firmware.bin ../SuperGreenApp2/assets/firmware/ControllerV2.1/
cp ./releases/ControllerV2.1Testing/$last_timestamp/timestamp ../SuperGreenApp2/assets/firmware/ControllerV2.1/
cp -r ./releases/ControllerV2.1Testing ../backend/SuperGreenCloud/www/update/
fi
./update_config.sh config_gen/config/SuperGreenOS/Controller/v3 config.controller.json
./update_templates.sh config.controller.json
./update_htmlapp.sh config.controller.json
./update_firmware.sh ControllerV3Testing
if [ $SKIP_APP -eq "0" ]; then
last_timestamp=$(cat ./releases/ControllerV3Testing/last_timestamp)
cp -r ./releases/ControllerV3Testing/$last_timestamp/html_app ../SuperGreenApp2/assets/firmware/ControllerV3/
cp ./releases/ControllerV3Testing/$last_timestamp/firmware.bin ../SuperGreenApp2/assets/firmware/ControllerV3/
cp ./releases/ControllerV3Testing/$last_timestamp/timestamp ../SuperGreenApp2/assets/firmware/ControllerV3/
cp -r ./releases/ControllerV3Testing ../backend/SuperGreenCloud/www/update/
fi