style: improve script syntax and errors

This commit is contained in:
Glenn Y. Rolland 2021-05-08 17:22:23 +02:00
parent 28609af439
commit 3ec5d3260e

View file

@ -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"