update.sh 370 B

12345678910111213141516171819
  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 branch=\${${var}_BRANCH}
  8. eval commit=\${${var}_COMMIT}
  9. mkdir -p "$1"/$module
  10. cd "$1"/$module
  11. git init
  12. git checkout $commit 2>/dev/null || git fetch $repo $branch
  13. git checkout -B base $commit
  14. done