aur/.util.sh

27 lines
489 B
Bash
Raw Normal View History

2021-07-26 20:34:17 +02:00
#!/bin/sh
2021-07-26 20:37:40 +02:00
update_github_tag() {
local repo=$1
2021-07-26 20:42:58 +02:00
ver=`curl -Ls https://api.github.com/repos/${repo}/tags | jq -r '.[0].name' | cut -c2-`
2021-07-26 20:37:40 +02:00
echo $ver
sed -i "s/pkgver=.*/pkgver=${ver}/" PKGBUILD
}
2021-07-26 20:34:17 +02:00
update_pkg() {
updpkgsums > /dev/null 2>&1
if [ $? -eq 0 ]
then
makepkg --printsrcinfo > .SRCINFO
git add .SRCINFO PKGBUILD
git commit -m "$(basename $(pwd)): update to $ver" > /dev/null 2>&1
if [ $? -eq 0 ]
then
git push
fi
fi
}