2013-12-28 14:11:59 +00:00
|
|
|
#!/bin/bash
|
2013-12-28 13:54:49 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2013-12-28 14:31:11 +00:00
|
|
|
. "$1"/modules
|
2013-12-28 13:54:49 +00:00
|
|
|
|
|
|
|
for module in $GLUON_MODULES; do
|
2013-12-28 14:31:11 +00:00
|
|
|
dir="$1"/$module
|
|
|
|
mkdir -p "$dir"
|
|
|
|
var=$(echo $module | tr '[:lower:]/' '[:upper:]_')
|
2013-12-28 13:54:49 +00:00
|
|
|
eval repo=\${MODULE_${var}_REPO}
|
|
|
|
eval commit=\${MODULE_${var}_COMMIT}
|
2013-12-28 14:31:11 +00:00
|
|
|
git -C "$dir" init
|
|
|
|
git -C "$dir" fetch $repo
|
|
|
|
git -C "$dir" checkout -B base $commit
|
2013-12-28 13:54:49 +00:00
|
|
|
done
|