From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH 2/3] scripts: container.sh: support -e for environment variables
Date: Fri, 10 Oct 2025 08:57:44 +0200 [thread overview]
Message-ID: <20251010065749.3141299-2-a.fatoum@barebox.org> (raw)
In-Reply-To: <20251010065749.3141299-1-a.fatoum@barebox.org>
This allows setting e.g. GNUMAKEFLAGS from the outside.
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
scripts/container.sh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/scripts/container.sh b/scripts/container.sh
index 1a68f0a5fe01..90c3a1d0accd 100755
--- a/scripts/container.sh
+++ b/scripts/container.sh
@@ -4,7 +4,7 @@
CONTAINER=${CONTAINER:-ghcr.io/barebox/barebox/barebox-ci:latest}
export KCONFIG_ADD="common/boards/configs/disable_target_tools.config $KCONFIG_ADD"
-while getopts "c:uh" opt; do
+while getopts "c:e:uh" opt; do
case "$opt" in
h)
echo "usage: $0 [-c CONTAINER] [command...]"
@@ -24,6 +24,10 @@ while getopts "c:uh" opt; do
c)
CONTAINER="$OPTARG"
;;
+ e)
+ env="$env -e $OPTARG"
+ ;;
+
esac
done
@@ -39,6 +43,6 @@ fi
exec podman run -it $volumes --rm \
-e TERM -e ARCH -e CONFIG -e JOBS -e LOGDIR -e REGEX \
- -e KBUILD_OUTPUT -e LG_BUILDDIR \
+ -e KBUILD_OUTPUT -e LG_BUILDDIR $env \
-e KCONFIG_ADD -w "$PWD" --userns=keep-id:uid=1000,gid=1000 \
-- "$CONTAINER" "${@:-/bin/bash}"
--
2.47.3
next prev parent reply other threads:[~2025-10-10 6:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 6:57 [PATCH 1/3] Documentation: fix warnings during config build Ahmad Fatoum
2025-10-10 6:57 ` Ahmad Fatoum [this message]
2025-10-10 6:57 ` [PATCH 3/3] Documentation: add contributing section Ahmad Fatoum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251010065749.3141299-2-a.fatoum@barebox.org \
--to=a.fatoum@barebox.org \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox