From ba7436058fbdd9579be2f36fcfb1b0ed1e692ab8 Mon Sep 17 00:00:00 2001 From: "Jon \"The Nice Guy\" Spriggs" Date: Thu, 16 Mar 2023 14:39:48 +0000 Subject: [PATCH] Create directory structure if it is missing --- entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index c977258..f5fd3ec 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,5 +1,9 @@ #!/bin/bash +if [ "$(dirname "$FILE_NAME")" != "." ] +then + mkdir -p "$(dirname "$FILE_NAME")" +fi if [[ -z "${FILE_BASE64}" ]]; then echo "Using FILE_DATA to write to $FILE_NAME" echo $FILE_DATA > "$FILE_NAME"