diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 35f5983..bcc2087 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -9,15 +9,26 @@ if [ ! -f /data/gitit.conf ]; then sed -i 's|default-extension: page|default-extension: md|' /data/gitit.conf fi +## Check existing variables +if [ -z "$GITIT_USER_EMAIL" ]; then + exit 1 +fi +if [ -z "$GITIT_USER_NAME" ]; then + exit 1 +fi + # Configure GIT CUR="$(pwd)" cd /data/wikidata + if [ ! -d /data/wikidata/.git ]; then git init fi git config diff.renames false -git config --global user.email "admin@localhost" -git config --global user.name "Admin From Localhost" + + +git config --global user.email "$GITIT_USER_EMAIL" +git config --global user.name "$GITIT_USER_NAME" cd "$CUR"