Browse Source

build.sh: I should test changes first

Karsten Böddeker 8 years ago
parent
commit
4c3d27bf90
1 changed files with 3 additions and 2 deletions
  1. 3 2
      build.sh

+ 3 - 2
build.sh

@@ -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