From 821b7451fcffc3fffcbea3f707cea28bed617577 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Tue, 12 Mar 2019 00:36:08 +0100 Subject: [PATCH] Better config for Git --- docker-entrypoint.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index e169ee3..35f5983 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -9,10 +9,22 @@ if [ ! -f /data/gitit.conf ]; then sed -i 's|default-extension: page|default-extension: md|' /data/gitit.conf 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" + +cd "$CUR" if [ "$1" = 'gitit' ]; then exec gitit "$@" fi + exec "$@"