浏览代码

[Update] Fix update check

andre.peters 7 年之前
父节点
当前提交
81c1ed9e4d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      update.sh

+ 1 - 1
update.sh

@@ -73,7 +73,7 @@ while (($#)); do
     --check|-c)
       echo "Checking remote code for updates..."
       git fetch origin ${BRANCH}
-      if [[ $(git branch ${BRANCH} --contains $(git rev-parse origin/${BRANCH}) > /dev/null 2> /dev/null; echo $?) != 0 ]]; then
+      if [[ -z $(git log HEAD --pretty=format:"%H" | grep $(git rev-parse origin/${BRANCH})) ]]; then
         echo "Updated code is available."
         exit 0
       else