gluon/scripts/update.sh
Julian Kornberger 3e0d439165 Allow specifying a branch for a module
If a given commit is not included in the master branch, the update script fails.
2014-07-15 15:31:52 +02:00

20 lines
370 B
Bash
Executable File

#!/bin/bash
set -e
. "$1"/scripts/modules.sh
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 $branch
git checkout -B base $commit
done