summarylogtreecommitdiffstats
path: root/update.fish
blob: b5ef1f1f2b515710e10756cefa8d3b0589fbc794 (plain)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env fish

set version $argv[1]
set hash (string sub -l 64 (curl -L https://github.com/r-darwish/topgrade/archive/v$version.tar.gz ^/dev/null | sha256sum))

sed -E "s/sha256sums=.*\$/sha256sums=\('$hash'\)/g" -i PKGBUILD
sed -E "s/pkgver=.*\$/pkgver=$version/g" -i PKGBUILD
makepkg --printsrcinfo > .SRCINFO
makepkg