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 -e
set -u set -u
GITIT_USER_EMAIL=${GITIT_USER_EMAIL:-} GITIT_USER_EMAIL="${GITIT_USER_EMAIL:-}"
GITIT_USER_NAME=${GITIT_USER_NAME:-} GITIT_USER_NAME="${GITIT_USER_NAME:-}"
GITIT_REMOTE_REPOSITORY=${GITIT_REMOTE_REPOSITORY:-} GITIT_REMOTE_REPOSITORY="${GITIT_REMOTE_REPOSITORY:-}"
GITIT_REMOTE_DOMAIN=${GITIT_REMOTE_DOMAIN:-} GITIT_REMOTE_DOMAIN="${GITIT_REMOTE_DOMAIN:-}"
if [ ! -f /data/gitit.conf ]; then if [ ! -f /data/gitit.conf ]; then
echo "Building config for gitit" echo "Building config for gitit"
@ -61,6 +61,9 @@ if [ -n "$GITIT_REMOTE_REPOSITORY" ]; then
MARK MARK
chmod 600 /root/.ssh/config chmod 600 /root/.ssh/config
chmod 700 /root/.ssh chmod 700 /root/.ssh
else
>&2 echo "INFO: Environment variable GITIT_REMOTE_REPOSITORY not defined."
>&2 echo " Skipping mirror repository configuration."
fi fi
cd "$CUR" cd "$CUR"