From ea578b81f2dcf966f18b25bbcb37b3bf59bb67e5 Mon Sep 17 00:00:00 2001 From: djarbz <30350993+djarbz@users.noreply.github.com> Date: Wed, 11 May 2022 14:47:01 -0500 Subject: [PATCH] Check if Entrypoint Dir exists & run all executable --- ci/release-image/entrypoint.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/release-image/entrypoint.sh b/ci/release-image/entrypoint.sh index 4796743c0..2844bdcc1 100755 --- a/ci/release-image/entrypoint.sh +++ b/ci/release-image/entrypoint.sh @@ -20,11 +20,11 @@ fi # Allow users to have scripts run on container startup to prepare workspace. # https://github.com/coder/code-server/issues/5177 -chmod u+x ${ENTRYPOINTD}/*.sh -sudo chown -R ${USER} ${ENTRYPOINTD}/* -for f in "${ENTRYPOINTD}"/*.sh; do - echo "Running Entrypoint: ${f}" - bash "${f}" -done +if [ -d "${ENTRYPOINTD}" ]; then + for f in $(find "${ENTRYPOINTD}" -type f -executable); do + echo "Running Entrypoint: ${f}" + "${f}" + done +fi exec dumb-init /usr/bin/code-server "$@"