From 21c672dffb1aa8ed04c6ca88a1c0dab053808e90 Mon Sep 17 00:00:00 2001
Message-ID: <21c672dffb1aa8ed04c6ca88a1c0dab053808e90.1766509916.git.h.goebel@crazy-compilers.com>
In-Reply-To: <59533f037e57da15fb262416fa69930b07e9f6f8.1766509916.git.h.goebel@crazy-compilers.com>
References: <59533f037e57da15fb262416fa69930b07e9f6f8.1766509916.git.h.goebel@crazy-compilers.com>
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
Date: Mon, 10 Nov 2025 17:40:59 +0100
Subject: [PATCH 3/3] sandcastle-build: Allow passing arguments to podman
 build.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

On my system this was needed to pass `--runtime=…`.
---
 sandcastle-build | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sandcastle-build b/sandcastle-build
index 1613354..15f3a42 100755
--- a/sandcastle-build
+++ b/sandcastle-build
@@ -3,11 +3,17 @@
 set -eu
 
 CONTAINERFILE="${1:-Dockerfile}"
+[ $# -gt 0 ] && shift
 
 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
 
 cd "$SCRIPT_DIR"
 
+if [ ! -r "${CONTAINERFILE}" ] ; then
+    echo >&2 "Containerfile '${CONTAINERFILE}' not found or not readable."
+    exit 1
+fi
 echo "Building with containerfile: ${CONTAINERFILE}"
 # The nofile ulimit is required to prevent fakeroot from becoming sluggish.
-exec podman build --ulimit=nofile=2048:2048 -f "${CONTAINERFILE}" --target taler-final -t taler-base-all .
+exec podman build --ulimit=nofile=2048:2048 -f "${CONTAINERFILE}" \
+     --target taler-final -t taler-base-all "$@" .
-- 
2.41.3

