From ccd2cb41456d5bcf10b160091ee66aba76b525e4 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Sun, 16 Jul 2017 19:37:16 -0700 Subject: [PATCH] Fixing opt arguments --- entrypoint.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 0fb4674..c3c62e2 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,15 +1,19 @@ #! /bin/bash -export OPT_ARGUMENTS="$@" - +# If first arg is bash, we'll just execute directly if [ "$1" == "bash" ]; then exec "$@" exit 0 fi +# If no env variable set, get from command line +if [ "$OPT_ARGUMENTS" == "" ]; then + export OPT_ARGUMENTS="$@" +fi + # If key id is provied add arg if [ -e "$GPG_KEY_ID" ]; then - OPT_ARGUMENTS="$OPT_ARGUMENTS --encrypt-sign-key=\"$GPG_KEY_ID\"" + export OPT_ARGUMENTS="$OPT_ARGUMENTS --encrypt-sign-key=\"$GPG_KEY_ID\"" fi if [ "$SKIP_ON_START" != "true" ]; then