update-subtree.sh 410 B

1234567891011121314
  1. #!/bin/bash
  2. set -e
  3. path="${GIT_PREFIX%/}"
  4. while read repo branch subdir; do
  5. if [ "${repo:0:1}" = "#" ]; then
  6. continue
  7. fi
  8. if [ "${subdir}" = "/" ]; then
  9. git subtree pull -P "${path}" "${repo}" "${branch}" -m "Merge ${path} from ${repo}"
  10. else
  11. bash .utils/subtree-subdir-helper.sh "${path}" "${repo}" "${branch}" "${subdir}" merge
  12. fi
  13. done < "${GIT_PREFIX}.gitsubtree"