service-gitit/docker-entrypoint.sh

31 lines
524 B
Bash
Raw Normal View History

2019-02-19 10:05:42 +00:00
#!/bin/sh
set -e
if [ ! -f /data/gitit.conf ]; then
echo "Building config for gitit"
gitit --print-default-config > /data/gitit.conf
sed -i 's|default-extension: page|default-extension: md|' /data/gitit.conf
fi
2019-03-11 23:36:08 +00:00
# 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"
2019-02-19 10:05:42 +00:00
if [ "$1" = 'gitit' ]; then
exec gitit "$@"
fi
2019-03-11 23:36:08 +00:00
2019-02-19 10:05:42 +00:00
exec "$@"