Skip to content

Commit 9050222

Browse files
committed
Unwrap for loop in download maps script
1 parent 131a35d commit 9050222

2 files changed

Lines changed: 9 additions & 25 deletions

File tree

.github/workflows/docker-ci.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@ jobs:
7373
run: sh dockerfiles/download_maps.sh
7474
if: steps.cache-sc2-maps.outputs.cache-hit != 'true'
7575

76-
- name: Enable experimental docker features
77-
run: |
78-
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
79-
sudo systemctl restart docker.service
80-
8176
- name: Run shell script
8277
env:
8378
VERSION_NUMBER: ${{ env.VERSION_NUMBER }}
@@ -112,11 +107,6 @@ jobs:
112107
run: sh dockerfiles/download_maps.sh
113108
if: steps.cache-sc2-maps.outputs.cache-hit != 'true'
114109

115-
- name: Enable experimental docker features
116-
run: |
117-
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
118-
sudo systemctl restart docker.service
119-
120110
- name: Run shell script
121111
continue-on-error: true
122112
env:

dockerfiles/download_maps.sh

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,15 @@ download_with_retry() {
1515
}
1616

1717
# Download and process sc2ai.net ladder maps
18-
for i in {1..7}; do
19-
case $i in
20-
1) url="https://sc2ai.net/wiki/184/plugin/attachments/download/9/" ;;
21-
2) url="https://sc2ai.net/wiki/184/plugin/attachments/download/14/" ;;
22-
3) url="https://sc2ai.net/wiki/184/plugin/attachments/download/21/" ;;
23-
4) url="https://sc2ai.net/wiki/184/plugin/attachments/download/35/" ;;
24-
5) url="https://sc2ai.net/wiki/184/plugin/attachments/download/36/" ;;
25-
6) url="https://sc2ai.net/wiki/184/plugin/attachments/download/38/" ;;
26-
7) url="https://sc2ai.net/wiki/184/plugin/attachments/download/39/" ;;
27-
esac
28-
29-
download_with_retry "$url" "$i.zip"
30-
unzip -q -o "$i.zip"
31-
rm "$i.zip"
32-
done
18+
curl -L https://sc2ai.net/wiki/184/plugin/attachments/download/9/ -o 1.zip
19+
curl -L https://sc2ai.net/wiki/184/plugin/attachments/download/14/ -o 2.zip
20+
curl -L https://sc2ai.net/wiki/184/plugin/attachments/download/21/ -o 3.zip
21+
curl -L https://sc2ai.net/wiki/184/plugin/attachments/download/35/ -o 4.zip
22+
curl -L https://sc2ai.net/wiki/184/plugin/attachments/download/36/ -o 5.zip
23+
curl -L https://sc2ai.net/wiki/184/plugin/attachments/download/38/ -o 6.zip
24+
curl -L https://sc2ai.net/wiki/184/plugin/attachments/download/39/ -o 7.zip
25+
unzip -q -o '*.zip'
26+
rm *.zip
3327

3428
# Download and process official blizzard maps
3529
download_with_retry "http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2019Season3.zip" "Ladder2019Season3.zip"

0 commit comments

Comments
 (0)