| 1234567891011121314151617181920212223 |
- #!/usr/bin/env bash
- #
- # Update patches using git-format-patch from a source tree prepared by
- # patch_git.sh.
- #
- # (c) 2021 Phil Sutter <phil@nwl.cc>
- wrkdist=$1
- wd=$(pwd)
- cd "$wrkdist"
- top="HEAD"
- git log --grep='^OpenADK patch marker:' --format='%H %s'$logopt | \
- while read hash o p m series; do
- [ -n "$(git log --oneline ${hash}..${top})" ] || continue
- patchdir=$(<.git/patch_tmp/${series}/__patchdir__)
- while read patchfile; do
- rm ${patchdir}/$patchfile
- done < .git/patch_tmp/${series}/__patchfiles__
- git format-patch --no-numbered --no-signoff --no-cover-letter \
- --no-signature -o "$patchdir" ${hash}..${top}
- top=${hash}^
- done
|