Skip to content

Commit 094e512

Browse files
committed
add download scripts
1 parent 5ee73c2 commit 094e512

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

scripts/download-proxy.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
3+
# check proxy directory exists, if exists, remove it
4+
if [ -d proxy ]; then
5+
echo "proxy directory exists, remove it"
6+
rm -rf proxy
7+
fi
8+
9+
mkdir proxy
10+
11+
cd proxy
12+
13+
# download soccer simulation proxy
14+
wget $(curl -s "https://api.github.com/repos/clsframework/soccer-simulation-proxy/releases/latest" | grep -oP '"browser_download_url": "\K[^"]*' | grep "soccer-simulation-proxy.tar.gz")
15+
16+
tar -xvf soccer-simulation-proxy.tar.gz
17+
18+
mv soccer-simulation-proxy/* .
19+
20+
rm -rf soccer-simulation-proxy
21+
22+
rm soccer-simulation-proxy.tar.gz

scripts/download-rcssserver.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/sh
2+
3+
# check rcssserver directory exists, if exists, remove it
4+
if [ -d rcssserver ]; then
5+
echo "rcssserver directory exists, remove it"
6+
rm -rf rcssserver
7+
fi
8+
9+
mkdir rcssserver
10+
11+
cd rcssserver
12+
13+
# download soccer simulation server App Image
14+
wget $(curl -s https://api.github.com/repos/clsframework/rcssserver/releases/latest | grep -oP '"browser_download_url": "\K(.*rcssserver-x86_64-.*\.AppImage)' | head -n 1)
15+
16+
# check download is successful
17+
if [ ! -f *.AppImage ]; then
18+
echo "Download failed"
19+
exit 1
20+
fi
21+
22+
mv rcssserver-x86_64-*.AppImage rcssserver
23+
24+
chmod +x rcssserver

0 commit comments

Comments
 (0)