瀏覽代碼

Allow specifying a branch for a module

If a given commit is not included in the master branch, the update script fails.
Julian Kornberger 10 年之前
父節點
當前提交
3e0d439165
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      scripts/update.sh

+ 2 - 1
scripts/update.sh

@@ -7,12 +7,13 @@ set -e
 for module in $GLUON_MODULES; do
 for module in $GLUON_MODULES; do
 	var=$(echo $module | tr '[:lower:]/' '[:upper:]_')
 	var=$(echo $module | tr '[:lower:]/' '[:upper:]_')
 	eval repo=\${${var}_REPO}
 	eval repo=\${${var}_REPO}
+	eval branch=\${${var}_BRANCH}
 	eval commit=\${${var}_COMMIT}
 	eval commit=\${${var}_COMMIT}
 
 
 	mkdir -p "$1"/$module
 	mkdir -p "$1"/$module
 	cd "$1"/$module
 	cd "$1"/$module
 	git init
 	git init
 
 
-	git checkout $commit 2>/dev/null || git fetch $repo
+	git checkout $commit 2>/dev/null || git fetch $repo $branch
 	git checkout -B base $commit
 	git checkout -B base $commit
 done
 done