gluon/scripts/update.sh
Matthias Schiffer d5f5ce74e8 build: add module separators/headings to patch/update/update-patches scripts
Suggested-by: Steffen Möller <steffen_moeller@gmx.de>
2016-03-26 00:03:04 +01:00

22 lines
474 B
Bash
Executable File

#!/bin/bash
set -e
. "$GLUONDIR"/scripts/modules.sh
for module in $GLUON_MODULES; do
echo "--- Updating module '$module' ---"
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
git submodule update --init --recursive
done