x11vnc: fix compile error
[openadk.git] / scripts / update-patches-git
blob6f0bbfedb38d4186dc943e71b197d45217b356eb
1 #!/usr/bin/env bash
3 # Update patches using git-format-patch from a source tree prepared by
4 # patch_git.sh.
6 # (c) 2021 Phil Sutter <phil@nwl.cc>
8 wrkdist=$1
9 wd=$(pwd)
11 cd "$wrkdist"
12 top="HEAD"
13 git log --grep='^OpenADK patch marker:' --format='%H %s'$logopt | \
14 while read hash o p m series; do
15 patchdir=$(<.git/patch_tmp/${series}/__patchdir__)
16 while read patchfile; do
17 rm ${patchdir}/$patchfile
18 done < .git/patch_tmp/${series}/__patchfiles__
19 git format-patch --no-numbered --no-signoff --no-cover-letter \
20 --no-signature -o "$patchdir" ${hash}..${top}
21 top=${hash}^
22 done