revert webroot in start.sh so it support webroot as a sub directory of your repo

This commit is contained in:
Ric Harvey
2016-07-26 10:42:55 +01:00
parent 4d56f79372
commit 79f3a36a9d

View File

@@ -29,15 +29,15 @@ if [ ! -z "$GIT_NAME" ]; then
fi fi
# Dont pull code down if the .git folder exists # Dont pull code down if the .git folder exists
if [ ! -d "${webroot}/.git" ]; then if [ ! -d "/var/www/html/.git" ]; then
# Pull down code from git for our site! # Pull down code from git for our site!
if [ ! -z "$GIT_REPO" ]; then if [ ! -z "$GIT_REPO" ]; then
# Remove the test index file # Remove the test index file
rm -Rf $webroot/index.php rm -Rf $webroot/index.php
if [ ! -z "$GIT_BRANCH" ]; then if [ ! -z "$GIT_BRANCH" ]; then
git clone -b $GIT_BRANCH $GIT_REPO $webroot git clone -b $GIT_BRANCH $GIT_REPO /var/www/html
else else
git clone $GIT_REPO $webroot git clone $GIT_REPO /var/www/html
fi fi
fi fi
fi fi