patch.sh 347 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. set -e
  3. shopt -s nullglob
  4. . "$1"/scripts/modules.sh
  5. for module in $GLUON_MODULES; do
  6. cd "$1"/$module
  7. git checkout -B patching base
  8. if [ "$1"/patches/$module/*.patch ]; then
  9. git am "$1"/patches/$module/*.patch || (
  10. git am --abort
  11. git checkout patched
  12. git branch -D patching
  13. false
  14. )
  15. fi
  16. git branch -M patched
  17. done