update.sh 450 B

1234567891011121314151617181920
  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 config commit.gpgsign false
  14. git branch -f base $commit 2>/dev/null || git fetch -f $repo $branch:base
  15. done