update.sh 497 B

1234567891011121314151617181920212223
  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. if ! git branch -f base $commit 2>/dev/null; then
  15. git fetch $repo $branch
  16. git branch -f base $commit 2>/dev/null
  17. fi
  18. done