update-patches.sh 585 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. set -e
  3. shopt -s nullglob
  4. . scripts/modules.sh
  5. GLUONDIR="$(pwd)"
  6. for module in $GLUON_MODULES; do
  7. echo "--- Updating patches for module '$module' ---"
  8. rm -rf "$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. mkdir -p "$GLUONDIR"/patches/"$module"
  14. git -c core.abbrev=40 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"
  15. done
  16. done