From 7cb973d6a30c83d7196d8b1e8f06a13393b1fd3b Mon Sep 17 00:00:00 2001 From: Ilir Bekteshi Date: Wed, 16 Oct 2019 10:47:45 +0200 Subject: [PATCH] Add flags when on of the Configs is specified --- entrypoint.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) mode change 100644 => 100755 entrypoint.sh diff --git a/entrypoint.sh b/entrypoint.sh old mode 100644 new mode 100755 index c424ae4..d8e8717 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,7 +1,15 @@ #!/bin/sh -l -if [ ! -z $INPUT_STRICT ]; then +if [ ! -z "$INPUT_STRICT" ]; then STRICT="-s" fi -yamllint $INPUT_CONFIG_FILE $INPUT_CONFIG_DATA $INPUT_FORMAT $STRICT $INPUT_FILE_OR_DIR +if [ ! -z "$INPUT_CONFIG_FILE" ]; then + CONFIG_FILE="-c $INPUT_CONFIG_FILE" +fi + +if [ ! -z "$INPUT_CONFIG_DATA" ]; then + CONFIG_DATA="-d $INPUT_CONFIG_DATA" +fi + +yamllint $CONFIG_FILE $CONFIG_DATA $INPUT_FORMAT $STRICT $INPUT_FILE_OR_DIR