update-subtree.sh 349 B

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