style: improve script syntax and errors
This commit is contained in:
parent
28609af439
commit
3ec5d3260e
1 changed files with 7 additions and 4 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue