summaryrefslogtreecommitdiff
path: root/openttd-git/update-patches
diff options
context:
space:
mode:
Diffstat (limited to 'openttd-git/update-patches')
-rwxr-xr-xopenttd-git/update-patches22
1 files changed, 22 insertions, 0 deletions
diff --git a/openttd-git/update-patches b/openttd-git/update-patches
new file mode 100755
index 00000000..02811856
--- /dev/null
+++ b/openttd-git/update-patches
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+cd "$(dirname "$0")"
+eval "$(
+ sed -n '
+ /^source=(/,/)/ p
+ ' PKGBUILD
+)"
+
+git -C openttd-git fetch local
+git -C openttd-git fetch --all -p
+
+printf '%s\n' "${source[@]}" \
+ | sed '
+ s/\.patch$//
+ t
+ d
+ ' \
+ | while read -r patch; do
+ git -C openttd-git diff master "remotes/local/${patch}" -- \
+ > "${patch}.patch"
+ done