gluon/scripts/update.sh
Matthias Schiffer 8cfd64d2db Make module scripts use GLUONDIR and GLUON_SITEDIR
This fixes `make update` not working correctly when GLUON_SITEDIR is set
manually.
2015-01-11 09:48:31 +01:00

20 lines
391 B
Bash
Executable File

#!/bin/bash
set -e
. "$GLUONDIR"/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 "$GLUONDIR"/$module
cd "$GLUONDIR"/$module
git init
git checkout $commit 2>/dev/null || git fetch $repo $branch
git checkout -B base $commit
done