From 3ec5d3260e795fbeb2d587e5396165b844192c58 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Sat, 8 May 2021 17:22:23 +0200 Subject: [PATCH] style: improve script syntax and errors --- docker-entrypoint.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index aaa28c8..d0fdb83 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -3,10 +3,10 @@ set -e set -u -GITIT_USER_EMAIL=${GITIT_USER_EMAIL:-} -GITIT_USER_NAME=${GITIT_USER_NAME:-} -GITIT_REMOTE_REPOSITORY=${GITIT_REMOTE_REPOSITORY:-} -GITIT_REMOTE_DOMAIN=${GITIT_REMOTE_DOMAIN:-} +GITIT_USER_EMAIL="${GITIT_USER_EMAIL:-}" +GITIT_USER_NAME="${GITIT_USER_NAME:-}" +GITIT_REMOTE_REPOSITORY="${GITIT_REMOTE_REPOSITORY:-}" +GITIT_REMOTE_DOMAIN="${GITIT_REMOTE_DOMAIN:-}" if [ ! -f /data/gitit.conf ]; then echo "Building config for gitit" @@ -61,6 +61,9 @@ if [ -n "$GITIT_REMOTE_REPOSITORY" ]; then MARK chmod 600 /root/.ssh/config chmod 700 /root/.ssh +else + >&2 echo "INFO: Environment variable GITIT_REMOTE_REPOSITORY not defined." + >&2 echo " Skipping mirror repository configuration." fi cd "$CUR"