Add new flag REMOVE_FILES to close #121

This commit is contained in:
Ric Harvey
2017-03-16 16:29:22 +00:00
parent fb035e0955
commit aa551a999e
3 changed files with 8 additions and 3 deletions

View File

@@ -36,8 +36,12 @@ fi
if [ ! -d "/var/www/html/.git" ]; then
# Pull down code from git for our site!
if [ ! -z "$GIT_REPO" ]; then
# Remove the test index file
rm -Rf /var/www/html/*
# Remove the test index file if you are pulling in a git repo
if [ ! -z ${REMOVE_FILES} ] && [ ${REMOVE_FILES} == 0 ]; then
echo "skiping removal of files"
else
rm -Rf /var/www/html/*
fi
GIT_COMMAND='git clone '
if [ ! -z "$GIT_BRANCH" ]; then
GIT_COMMAND=${GIT_COMMAND}" -b ${GIT_BRANCH}"