aur/.util.sh
nyyu 231f368968
All checks were successful
continuous-integration/drone/push Build is passing
k3s: add auto update
2021-07-26 20:42:58 +02:00

27 lines
489 B
Bash

#!/bin/sh
update_github_tag() {
local repo=$1
ver=`curl -Ls https://api.github.com/repos/${repo}/tags | jq -r '.[0].name' | cut -c2-`
echo $ver
sed -i "s/pkgver=.*/pkgver=${ver}/" PKGBUILD
}
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
}