patch.sh 488 B

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