[Scummvm-git-logs] scummvm branch-2-3 -> 48e33790bf679d7a08e23ee7aab805ea57535d8b

ccawley2011 ccawley2011 at gmail.com
Thu Sep 2 15:24:23 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
48e33790bf DEVTOOLS: Add a build script to simplify building with Docker


Commit: 48e33790bf679d7a08e23ee7aab805ea57535d8b
    https://github.com/scummvm/scummvm/commit/48e33790bf679d7a08e23ee7aab805ea57535d8b
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-09-02T16:24:12+01:00

Commit Message:
DEVTOOLS: Add a build script to simplify building with Docker

Changed paths:
  A devtools/docker.sh
    devtools/README


diff --git a/devtools/README b/devtools/README
index 07f4add8ad..a1fc928bfe 100644
--- a/devtools/README
+++ b/devtools/README
@@ -149,6 +149,18 @@ dist-scummvm.sh
     account.
 
 
+docker.sh
+---------
+    This shell script is used to simplify building with the Docker images
+    used by the buildbot. It can invoked like this:
+
+      ./devtools/docker.sh toolchain/mxe
+
+    This will fetch the MXE toolchain from the Docker Hub if it hasn't
+    already and launch a shell that can be used to build ScummVM for
+    Windows.
+
+
 dumper_companion.py
 ___________________
     Tool for dumping HFS/HFS+ volumes and game files with non-ASCII
diff --git a/devtools/docker.sh b/devtools/docker.sh
new file mode 100755
index 0000000000..8cac2da522
--- /dev/null
+++ b/devtools/docker.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# This shell script is used to simplify building with the Docker images
+# used by the buildbot.
+
+DIR="$(cd "$(dirname "$0")/.." && pwd)"
+
+_image=
+_update=no
+
+for ac_option in $@; do
+	case "$ac_option" in
+	--update)
+		_update=yes
+		;;
+	--*)
+		echo "Unknown argument '$ac_option'"
+		exit 1
+		;;
+	*)
+		if [ -n "$_image" ]; then
+			echo "A toolchain image has already been specified"
+			exit 1
+		fi
+		_image=$ac_option
+		;;
+	esac;
+done;
+
+if [ -z "$_image" ]; then
+	echo "No toolchain image has been specified"
+	exit 1
+fi
+
+if test "$_update" != yes ; then
+	if ! docker image inspect $_image >/dev/null 2>&1 ; then
+		echo "Image is not available"
+		_update=yes
+	fi
+fi
+
+if test "$_update" = yes ; then
+	docker_url=`echo $_image | sed 's/\([^\/]*\)\/\([^\/]*\)/scummvm\/dockerized-\1:\2/'`
+	(docker pull $docker_url && docker tag $docker_url $_image && docker rmi $docker_url) || exit 1
+fi
+
+docker run -v $DIR:/data/scummvm -w /data/scummvm -it $_image /bin/bash




More information about the Scummvm-git-logs mailing list