summaryrefslogtreecommitdiff
path: root/openttd-git/update-patches
diff options
context:
space:
mode:
Diffstat (limited to 'openttd-git/update-patches')
-rwxr-xr-xopenttd-git/update-patches51
1 files changed, 12 insertions, 39 deletions
diff --git a/openttd-git/update-patches b/openttd-git/update-patches
index 7b2e04b9d..1ad649aea 100755
--- a/openttd-git/update-patches
+++ b/openttd-git/update-patches
@@ -10,43 +10,16 @@ eval "$(
makepkg --verifysource
git -C openttd-git fetch local
git -C openttd-git fetch --all -p
+updpkgsums
-sums=$(
- {
- printf '%s\n' "${source[@]}" \
- | sed '
- s/\.patch$//
- t
- s/^.*$/SKIP/
- w /dev/stderr
- 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"
- sha512sum "${patch}.patch" | \
- awk '{print $1}'
- done
- } 2>&1 \
- | sed '
- s/^/'"'"'/
- s/$/'"'"'/
- 1 s/^/sha512sums=(/
- 1! s/^/ /
- $ s/$/)/
- ' \
- | sed '
- :a
- N
- $! ba
- s/\n/\\n/g
- '
-)
-
-sed -i '
- /^sha512sums=(/,/^[^#]*)$/ {
- s/^sha512sums=(.*$/'"${sums}"'/
- t
- d
- }
-' PKGBUILD
+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