blob: a03ffa04942b3833b01650e5c4aa8f8d0c9faaf9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
update:
#!/usr/bin/env bash
set -euxo pipefail
source PKGBUILD
old_pkgver=$pkgver
makepkg --nobuild --check --syncdeps --noconfirm
makepkg --printsrcinfo > .SRCINFO
source PKGBUILD
if [ "$old_pkgver" = "$pkgver" ]; then
sed --regexp-extended --in-place -E "0,/pkgrel=.+$/{s/(pkgrel=)(.+$)/\1$((pkgrel+1))/}" ./PKGBUILD
else
sed --regexp-extended --in-place -E "0,/pkgrel=.+$/{s/(pkgrel=)(.+$)/\11/}" ./PKGBUILD
fi
makepkg --printsrcinfo > .SRCINFO
git commit --all --message $pkgver
|