update.sh 391 B

12345678910111213141516171819
  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. done