update-patches.sh 565 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. echo "--- Updating patches for module '$module' ---"
  7. rm -f "$GLUONDIR"/patches/"$module"/*.patch
  8. mkdir -p "$GLUONDIR"/patches/"$module"
  9. cd "$GLUONDIR"/"$module"
  10. n=0
  11. for commit in $(git rev-list --reverse --no-merges base..patched); do
  12. let n=n+1
  13. git show --pretty=format:'From: %an <%ae>%nDate: %aD%nSubject: %B' --no-renames "$commit" > "$GLUONDIR/patches/$module/$(printf '%04u' $n)-$(git show -s --pretty=format:%f "$commit").patch"
  14. done
  15. done