2013-12-28 14:11:59 +00:00
|
|
|
#!/bin/bash
|
2013-12-28 13:54:49 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2015-01-11 08:48:31 +00:00
|
|
|
. "$GLUONDIR"/scripts/modules.sh
|
2013-12-28 13:54:49 +00:00
|
|
|
|
|
|
|
for module in $GLUON_MODULES; do
|
2016-03-25 23:00:35 +00:00
|
|
|
echo "--- Updating module '$module' ---"
|
2013-12-28 14:31:11 +00:00
|
|
|
var=$(echo $module | tr '[:lower:]/' '[:upper:]_')
|
2014-01-02 14:16:32 +00:00
|
|
|
eval repo=\${${var}_REPO}
|
2014-07-15 13:31:52 +00:00
|
|
|
eval branch=\${${var}_BRANCH}
|
2014-01-02 14:16:32 +00:00
|
|
|
eval commit=\${${var}_COMMIT}
|
2013-12-28 20:35:16 +00:00
|
|
|
|
2015-01-11 08:48:31 +00:00
|
|
|
mkdir -p "$GLUONDIR"/$module
|
|
|
|
cd "$GLUONDIR"/$module
|
2013-12-31 16:03:39 +00:00
|
|
|
git init
|
|
|
|
|
2016-08-12 07:23:07 +00:00
|
|
|
if ! git branch -f base $commit 2>/dev/null; then
|
|
|
|
git fetch $repo $branch
|
|
|
|
git branch -f base $commit 2>/dev/null
|
|
|
|
fi
|
2013-12-28 13:54:49 +00:00
|
|
|
done
|