patch.sh 531 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. set -e
  3. shopt -s nullglob
  4. . "$GLUONDIR"/scripts/modules.sh
  5. for module in $GLUON_MODULES; do
  6. echo "--- Patching module '$module' ---"
  7. cd "$GLUONDIR"/$module
  8. git checkout -B patching base
  9. for patch in "$GLUONDIR"/patches/$module/*.patch; do
  10. if ! git -c user.name='Gluon Patch Manager' -c user.email='gluon@void.example.com' am --whitespace=nowarn --committer-date-is-author-date "$patch"; then
  11. git am --abort
  12. git checkout patched
  13. git branch -D patching
  14. exit 1
  15. fi
  16. done
  17. git branch -M patched
  18. done