Skip to content

Commit 118759b

Browse files
wizzupjrepp
authored andcommitted
Script cleanup (#3)
* wget : continue dowload or skip if it is already done * remove trailng whitespaces * fix shebang #!/bin/bash -> #!/usr/bin/env * make make-container.sh callable anywhere
1 parent c47f26b commit 118759b

14 files changed

+34
-22
lines changed

build/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ WORKDIR /s2client-api
2929
ADD downloads/s2client-api .
3030
ADD api-*.sh /s2client-api/
3131

32-
ENTRYPOINT [ "/bin/bash" ]
32+
ENTRYPOINT [ "/bin/bash" ]

build/api-all.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
2+
23
./api-build.sh && ./api-package.sh && ./api-copy.sh

build/api-copy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
echo "Copying built artifacts into /build-mount"
33
ls /s2client-api/s2client-api-*
44
cp /s2client-api/s2client-api-* /build-mount/

build/api-package.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
VERSION=3.16.1
33
PACKAGE=s2client-api-${VERSION}.tgz
44

build/build-copy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
VERSION=3.16.1
44

build/make-container.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env bash
22

33
# This builds the container
4-
docker build . -t s2client-api
4+
IMGNAME=s2client-api
5+
SCRIPT_PATH=${0%/*}
6+
7+
echo ${IMGNAME} docker image building using ${SCRIPT_PATH}/Dockerfile
8+
docker build ${SCRIPT_PATH} -t ${IMGNAME}

dev/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ RUN \
2727
# Add the code
2828
WORKDIR /s2client-api
2929

30-
ENTRYPOINT [ "/bin/bash" ]
30+
ENTRYPOINT [ "/bin/bash" ]

dev/make-container.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env bash
22

33
# This builds the container
4-
docker build . -t s2client-dev
4+
IMGNAME=s2client-dev
5+
SCRIPT_PATH=${0%/*}
6+
7+
echo ${IMGNAME} docker image building using ${SCRIPT_PATH}/Dockerfile
8+
docker build ${SCRIPT_PATH} -t ${IMGNAME}

game/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ ENTRYPOINT [ "/SC2/3.16.1/StarCraftII/Versions/Base55958/SC2_x64", \
2525
"-listen", \
2626
"127.0.0.1", \
2727
"-port", \
28-
"12000" ]
28+
"12000" ]

game/download.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
VERSION=3.16.1
44

5-
# This downloads zip files for current version
5+
# This downloads zip files for current version
66
mkdir -p downloads/
77
pushd downloads
8-
wget http://blzdistsc2-a.akamaihd.net/Linux/SC2.${VERSION}.zip
9-
wget http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season1.zip
10-
wget http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season2.zip
11-
wget http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season3.zip
12-
wget http://blzdistsc2-a.akamaihd.net/MapPacks/Melee.zip
8+
wget -c http://blzdistsc2-a.akamaihd.net/Linux/SC2.${VERSION}.zip
9+
wget -c http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season1.zip
10+
wget -c http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season2.zip
11+
wget -c http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season3.zip
12+
wget -c http://blzdistsc2-a.akamaihd.net/MapPacks/Melee.zip
1313
popd

0 commit comments

Comments
 (0)