summaryrefslogtreecommitdiff
path: root/openttd-git/update-patches
blob: 5577f8323d443fccc2263ef9c50d29956bcc6394 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

cd "$(dirname "$0")"
eval "$(
  sed -n '
    /^source=(/,/)/ p
  ' PKGBUILD
)"

makepkg --verifysource
git -C openttd-git fetch local
git -C openttd-git fetch --all -p
updpkgsums

printf '%s\n' "${source[@]}" \
| sed '
  s/\.patch$//
  /-pre$/d
  t
  d
' \
| while read -r patch; do
  git -C openttd-git diff $(git -C openttd-git merge-base master "remotes/local/${patch}") "remotes/local/${patch}" -- \
  > "${patch}.patch"
done
updpkgsums