summaryrefslogtreecommitdiff
path: root/openttd-git/update-patches
blob: 1ad649aea4bea1ad25fc189cb03601db5b2a53dd (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
#!/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$//
  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