From 3e0d439165a97266ce32be97e9eeddabbdf9a88f Mon Sep 17 00:00:00 2001 From: Julian Kornberger Date: Tue, 15 Jul 2014 15:31:52 +0200 Subject: [PATCH] Allow specifying a branch for a module If a given commit is not included in the master branch, the update script fails. --- scripts/update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/update.sh b/scripts/update.sh index 0f2bd505..f7319748 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -7,12 +7,13 @@ set -e for module in $GLUON_MODULES; do var=$(echo $module | tr '[:lower:]/' '[:upper:]_') eval repo=\${${var}_REPO} + eval branch=\${${var}_BRANCH} eval commit=\${${var}_COMMIT} mkdir -p "$1"/$module cd "$1"/$module 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 done