forked from ExpressLRS/web-flasher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_artifacts.sh
executable file
·45 lines (40 loc) · 1.28 KB
/
get_artifacts.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
#!/bin/bash
mkdir -p public/assets
cd public/assets
# Remove old firmware files
rm -rf firmware backpack
# Download main ELRS firmware, for each tagged version
mkdir -p firmware
cd firmware
curl -L -o index.json https://artifactory.expresslrs.org/ExpressLRS/index.json
for HASH in `cat index.json | jq '.tags,.branches | values[]' | sed 's/"//g' | sort -ru` ; do
curl -L -o firmware.zip "https://artifactory.expresslrs.org/ExpressLRS/$HASH/firmware.zip"
mkdir $HASH
cd $HASH
unzip -q ../firmware.zip
mv firmware/* .
rm -rf firmware
cd ..
rm firmware.zip
done
# Download the published hardware targets into the `firmware` directory
mkdir hardware
cd hardware
curl -L -o hardware.zip https://artifactory.expresslrs.org/ExpressLRS/hardware.zip
unzip -q hardware.zip
rm hardware.zip
# Download backpack firmware, for each tagged version
cd ../..
mkdir -p backpack
cd backpack
curl -L -o index.json https://artifactory.expresslrs.org/Backpack/index.json
for HASH in `cat index.json | jq '.tags,.branches | values[]' | sed 's/"//g' | sort -ru` ; do
curl -L -o firmware.zip "https://artifactory.expresslrs.org/Backpack/$HASH/firmware.zip"
mkdir $HASH
cd $HASH
unzip -q ../firmware.zip
mv firmware/* .
rm -rf firmware
cd ..
rm firmware.zip
done