gluon/scripts/update.sh
2013-12-31 17:03:39 +01:00

19 lines
330 B
Bash
Executable File

#!/bin/bash
set -e
. "$1"/modules
for module in $GLUON_MODULES; do
var=$(echo $module | tr '[:lower:]/' '[:upper:]_')
eval repo=\${MODULE_${var}_REPO}
eval commit=\${MODULE_${var}_COMMIT}
mkdir -p "$1"/$module
cd "$1"/$module
git init
git checkout $commit 2>/dev/null || fetch $repo
git checkout -B base $commit
done