Skip to content
This repository was archived by the owner on Jun 30, 2021. It is now read-only.

Commit 8a64e8f

Browse files
committed
Add host-scripts/get-host-scripts-and-dump.sh
1 parent ccf5b28 commit 8a64e8f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/usr/bin/env bash
2+
3+
# Exit immediately if a command exits with a non-zero status
4+
set -e
5+
6+
BASEURL="https://github.com/elgalu/docker-selenium"
7+
CURVERSION="2.46.0-06"
8+
HSVERDIR="docker-selenium-${CURVERSION}/host-scripts"
9+
10+
if [ ! -f "${CURVERSION}.zip" ]; then
11+
wget -nv "${BASEURL}/archive/${CURVERSION}.zip"
12+
fi
13+
14+
if [ ! -d "${HSVERDIR}" ]; then
15+
unzip ${CURVERSION}.zip "${HSVERDIR}/*"
16+
fi
17+
18+
ln -sf ${HSVERDIR} host-scripts
19+
20+
if [ -f "${CURVERSION}.zip" ]; then
21+
rm ${CURVERSION}.zip
22+
fi
23+
24+
for i in $(seq 0 3); do
25+
FILENAME="${CURVERSION}.tar--part0${i}"
26+
DOWNPART="${BASEURL}/releases/download/${CURVERSION}/${FILENAME}"
27+
if [ ! -f "${FILENAME}" ]; then
28+
echo "Downloading '${FILENAME}' ..."
29+
wget -nv "${DOWNPART}"
30+
fi
31+
done
32+
33+
# Join
34+
if [ ! -f "${CURVERSION}.tar" ]; then
35+
echo "Joining ${CURVERSION}.tar parts..."
36+
cat ${CURVERSION}.tar--part* > ${CURVERSION}.tar
37+
fi

0 commit comments

Comments
 (0)