summarylogtreecommitdiffstats
path: root/update.bash
blob: 5f492b35852dc163f687643099a34fd4eb6c38b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

URL=$(curl -s https://app.gitbutler.com/releases | jq '.platforms."linux-x86_64".url' )


BUILD=$(echo $URL | grep -oE '\-[0-9]+/' | grep -oE '[0-9]+')
VER=$(echo $URL | grep -oE '[0-9]+.[0-9]+.[0-9]+-' | sed 's/-//g')

echo $VER
echo $BUILD

sed -i "s/pkgrel=.*/pkgrel=1/" PKGBUILD
sed -i "s/pkgver=.*/pkgver=$VER/" PKGBUILD
sed -i "s/_pkgvernum=.*/_pkgvernum=$BUILD/" PKGBUILD
updpkgsums
makepkg --printsrcinfo > .SRCINFO
git add -p
git commit -m "v$VER"