|
@@ -130,13 +130,14 @@ GLUON_COMMIT=$(git rev-list --max-count=1 HEAD)
|
|
|
### CHECKOUT SITE REPO
|
|
|
progress "Checking out SITE REPO ..."
|
|
|
pushd ${SITE_DIR} > /dev/null
|
|
|
-if [ $(git remote | wc -l) >= 1 ]; then
|
|
|
+if [ $(git remote | wc -l) -ge "1" ]; then
|
|
|
git fetch
|
|
|
# TODO: check if site got modified locally and bail out if necessary
|
|
|
if [ -z "${SITE_ID}" ]; then
|
|
|
# no specific site given - get the most current one
|
|
|
git checkout -q ${BRANCH}
|
|
|
- if [ git branch -r | grep ${BRANCH} ]; then
|
|
|
+ git branch -r | grep ${BRANCH} > /dev/null
|
|
|
+ if [ "$?" -eq "0" ]; then
|
|
|
git rebase
|
|
|
[ "$?" -eq "0" ] || abort "Failed to get newest '${BRANCH}' in site repository, mimimi."
|
|
|
fi
|