From 54fa390139655ca7c16a86002feebe09483fcba8 Mon Sep 17 00:00:00 2001 From: srnyx <25808801+srnyx@users.noreply.github.com> Date: Sun, 25 Aug 2024 21:21:13 -0400 Subject: [PATCH] Fix #261 https://github.com/pelican-eggs/yolks/issues/261 --- cassandra/entrypoint.sh | 10 +++++----- erlang/entrypoint.sh | 10 +++++----- go/entrypoint.sh | 10 +++++----- java/entrypoint.sh | 10 +++++----- oses/alpine/entrypoint.sh | 10 +++++----- voice/teaspeak/entrypoint.sh | 10 +++++----- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/cassandra/entrypoint.sh b/cassandra/entrypoint.sh index d86fe45c..b91ad645 100644 --- a/cassandra/entrypoint.sh +++ b/cassandra/entrypoint.sh @@ -29,10 +29,10 @@ fi # Convert all of the "{{VARIABLE}}" parts of the command into the expected shell # variable format of "${VARIABLE}" before evaluating the string and automatically # replacing the values. -PARSED=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') -# Display the command we're running in the output, and then execute it with the env -# from the container itself. -printf "\033[1m\033[33mcontainer@pelican~ \033[0m%s\n" "$PARSED" +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer@pelican~ \033[0m" +echo "$PARSED" # shellcheck disable=SC2086 -exec env ${PARSED} +eval "$PARSED" diff --git a/erlang/entrypoint.sh b/erlang/entrypoint.sh index 51300ce1..b6571697 100644 --- a/erlang/entrypoint.sh +++ b/erlang/entrypoint.sh @@ -16,10 +16,10 @@ erl -noshell -eval 'erlang:display(erlang:system_info(system_version))' -eval 'i # Convert all of the "{{VARIABLE}}" parts of the command into the expected shell # variable format of "${VARIABLE}" before evaluating the string and automatically # replacing the values. -PARSED=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') -# Display the command we're running in the output, and then execute it with the env -# from the container itself. -printf "\033[1m\033[33mcontainer@pelican~ \033[0m%s\n" "$PARSED" +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer@pelican~ \033[0m" +echo "$PARSED" # shellcheck disable=SC2086 -exec env ${PARSED} +eval "$PARSED" diff --git a/go/entrypoint.sh b/go/entrypoint.sh index 898910a6..5de2ba67 100644 --- a/go/entrypoint.sh +++ b/go/entrypoint.sh @@ -40,10 +40,10 @@ go version # Convert all of the "{{VARIABLE}}" parts of the command into the expected shell # variable format of "${VARIABLE}" before evaluating the string and automatically # replacing the values. -PARSED=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') -# Display the command we're running in the output, and then execute it with the env -# from the container itself. -printf "\033[1m\033[33mcontainer@pelican~ \033[0m%s\n" "$PARSED" +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer@pelican~ \033[0m" +echo "$PARSED" # shellcheck disable=SC2086 -exec env ${PARSED} +eval "$PARSED" diff --git a/java/entrypoint.sh b/java/entrypoint.sh index 3eb25df0..23b662ae 100755 --- a/java/entrypoint.sh +++ b/java/entrypoint.sh @@ -40,10 +40,10 @@ java -version # Convert all of the "{{VARIABLE}}" parts of the command into the expected shell # variable format of "${VARIABLE}" before evaluating the string and automatically # replacing the values. -PARSED=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') -# Display the command we're running in the output, and then execute it with the env -# from the container itself. -printf "\033[1m\033[33mcontainer@pelican~ \033[0m%s\n" "$PARSED" +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer@pelican~ \033[0m" +echo "$PARSED" # shellcheck disable=SC2086 -eval ${PARSED} +eval "$PARSED" diff --git a/oses/alpine/entrypoint.sh b/oses/alpine/entrypoint.sh index 2d07411f..2b810223 100644 --- a/oses/alpine/entrypoint.sh +++ b/oses/alpine/entrypoint.sh @@ -34,11 +34,11 @@ cd /home/container || exit 1 # Convert all of the "{{VARIABLE}}" parts of the command into the expected shell # variable format of "${VARIABLE}" before evaluating the string and automatically # replacing the values. -PARSED=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') -# Display the command we're running in the output, and then execute it with the env -# from the container itself. -printf "\033[1m\033[33mcontainer@pelican~ \033[0m%s\n" "$PARSED" +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer@pelican~ \033[0m" +echo "$PARSED" # shellcheck disable=SC2086 -exec env ${PARSED} +eval "$PARSED" diff --git a/voice/teaspeak/entrypoint.sh b/voice/teaspeak/entrypoint.sh index 16a19f13..61423331 100644 --- a/voice/teaspeak/entrypoint.sh +++ b/voice/teaspeak/entrypoint.sh @@ -15,10 +15,10 @@ echo "installed youtube-dl Version:" # Convert all of the "{{VARIABLE}}" parts of the command into the expected shell # variable format of "${VARIABLE}" before evaluating the string and automatically # replacing the values. -PARSED=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') -# Display the command we're running in the output, and then execute it with the env -# from the container itself. -printf "\033[1m\033[33mcontainer@pelican~ \033[0m%s\n" "$PARSED" +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer@pelican~ \033[0m" +echo "$PARSED" # shellcheck disable=SC2086 -exec env ${PARSED} +eval "$PARSED"