update-patches.sh 465 B

123456789101112131415161718
  1. #!/bin/bash
  2. set -e
  3. shopt -s nullglob
  4. . "$1"/modules
  5. for module in $GLUON_MODULES; do
  6. dir="$1"/$module
  7. rm -f "$1"/patches/$module/*.patch
  8. mkdir -p "$1"/patches/$module
  9. n=0
  10. for commit in $(git -C "$dir" rev-list --reverse --no-merges base..patched); do
  11. let n=n+1
  12. git -C "$dir" show --pretty=format:'From: %an <%ae>%nDate: %aD%nSubject: %B' $commit > "$1"/patches/$module/"$(printf '%04u' $n)-$(git -C "$dir" show -s --pretty=format:%f).patch"
  13. done
  14. done