update.sh 331 B

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