patch.sh 479 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. if [ "$(echo "$GLUONDIR"/patches/$module/*.patch)" ]; then
  9. git -c user.name='Gluon Patch Manager' -c user.email='gluon@void.example.com' am --whitespace=nowarn "$GLUONDIR"/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