update.sh 432 B

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