mirror of
https://github.com/ValveSoftware/GameNetworkingSockets.git
synced 2026-05-29 16:20:34 +00:00
travis: add generic install.sh to find image-appropriate script
Makes it easier to add images with weird characters in them, e.g. "opensuse/tumbleweed:latest" would end up giving the wrong path with the old config. Signed-off-by: Steven Noonan <steven@valvesoftware.com>
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ before_install:
|
||||
- docker exec -e TRAVIS_BUILD=1 -e IMAGE=$IMAGE -e IMAGE_TAG=$IMAGE_TAG -t $CONTAINER_NAME sh .travis/preinstall.sh
|
||||
|
||||
install:
|
||||
- docker exec -e TRAVIS_BUILD=1 -e IMAGE=$IMAGE -e IMAGE_TAG=$IMAGE_TAG -t $CONTAINER_NAME bash .travis/install-$IMAGE.sh
|
||||
- docker exec -e TRAVIS_BUILD=1 -e IMAGE=$IMAGE -e IMAGE_TAG=$IMAGE_TAG -t $CONTAINER_NAME bash .travis/install.sh
|
||||
- docker exec -e TRAVIS_BUILD=1 -e IMAGE=$IMAGE -e IMAGE_TAG=$IMAGE_TAG -t $CONTAINER_NAME bash .travis/install-post.sh
|
||||
|
||||
script:
|
||||
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
INSTALL_SCRIPT_CANDIDATES=(
|
||||
"$PWD/.travis/install-${IMAGE//\//-}.sh"
|
||||
"$PWD/.travis/install-${IMAGE%/*}.sh"
|
||||
)
|
||||
|
||||
for INSTALL_SCRIPT in "${INSTALL_SCRIPT_CANDIDATES[@]}"; do
|
||||
if [[ -f "${INSTALL_SCRIPT}" ]]; then
|
||||
bash "${INSTALL_SCRIPT}"
|
||||
exit $?
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Could not find install script in any of these paths:"
|
||||
for INSTALL_SCRIPT in "${INSTALL_SCRIPT_CANDIDATES[@]}"; do
|
||||
echo " ${INSTALL_SCRIPT}"
|
||||
done
|
||||
echo ""
|
||||
echo "Don't know how to install packages for ${IMAGE}!"
|
||||
echo ""
|
||||
exit 1
|
||||
Reference in New Issue
Block a user