update.sh 474 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. set -e
  3. . "$GLUONDIR"/scripts/modules.sh
  4. for module in $GLUON_MODULES; do
  5. echo "--- Updating module '$module' ---"
  6. var=$(echo $module | tr '[:lower:]/' '[:upper:]_')
  7. eval repo=\${${var}_REPO}
  8. eval branch=\${${var}_BRANCH}
  9. eval commit=\${${var}_COMMIT}
  10. mkdir -p "$GLUONDIR"/$module
  11. cd "$GLUONDIR"/$module
  12. git init
  13. git checkout $commit 2>/dev/null || git fetch $repo $branch
  14. git checkout -B base $commit
  15. git submodule update --init --recursive
  16. done