From 8cbd91486fbaccccc6579ae2d48dd105602a7e70 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Sun, 3 Mar 2024 01:00:09 +0100 Subject: [PATCH] Entryscript: don't check sentinel if we're running arbitrary commands --- entry.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/entry.sh b/entry.sh index a4d0f8b..3c0b077 100755 --- a/entry.sh +++ b/entry.sh @@ -1,22 +1,22 @@ #!/bin/sh set -e -SENTINEL=/src/pyconfig.h.in - -if [ ! -e ${SENTINEL} ]; then - echo "ERROR: ${SENTINEL} not found " - echo "Did you forget to mount Python work directory with '-v.:/src'?" - echo - echo " docker run -v\$PWD:/src ghcr.io/corona10/cpython_autoconf" - echo " podman run -v\$PWD:/src:Z ghcr.io/corona10/cpython_autoconf" - exit 2 -fi - BIN=/usr/local/bin AUTOCONF=$BIN/autoconf AUTORECONF=$BIN/autoreconf if [ "$#" = "0" ]; then + local SENTINEL=/src/pyconfig.h.in + + if [ ! -e ${SENTINEL} ]; then + echo "ERROR: ${SENTINEL} not found " + echo "Did you forget to mount Python work directory with '-v.:/src'?" + echo + echo " docker run -v\$PWD:/src ghcr.io/corona10/cpython_autoconf" + echo " podman run -v\$PWD:/src:Z ghcr.io/corona10/cpython_autoconf" + exit 2 + fi + echo "Rebuilding configure script using $($AUTOCONF --version | head -n 1)" exec gosu $AUTORECONF -ivf -Werror $@ fi