custom-html-tiny/entrypoint.git-pull.sh

12 lines
213 B
Bash

#!/bin/sh
if [ ! -d /git/.git ]; then
echo "No repo found, emptying /git/ directory"
rm -r /git/*
echo "Cloning $GIT_REPO_URL into /git"
git clone "$GIT_REPO_URL" /git
else
echo "Updating /git"
git pull
fi