Add upd.sh
Script the automates most of the update process.
This commit is contained in:
parent
80e3a26eb4
commit
ec43ba2b17
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get new version info
|
||||||
|
URL=$(curl -H 'X-Ubuntu-Series: 16' https://api.snapcraft.io/api/v1/snaps/details/termius-beta | jq '.download_url' -r | cut -d "_" -f2)
|
||||||
|
VER=$(curl -H 'X-Ubuntu-Series: 16' https://api.snapcraft.io/api/v1/snaps/details/termius-beta | jq '.version' -r)
|
||||||
|
|
||||||
|
# Update PKGBUILD
|
||||||
|
sed -i "s/_[0-9]\+.snap/_$URL/g" PKGBUILD
|
||||||
|
sed -i "s/pkgver=.*$/pkgver=$VER/g" PKGBUILD
|
||||||
|
|
||||||
|
# Calc new hash
|
||||||
|
updpkgsums
|
||||||
|
|
||||||
|
# Build & install pkg
|
||||||
|
makepkg -si
|
||||||
|
|
||||||
|
# Update .SRCINFO
|
||||||
|
makepkg --printsrcinfo > .SRCINFO
|
||||||
|
|
||||||
|
# Git ops
|
||||||
|
git add .SRCINFO PKGBUILD
|
||||||
|
git commit -m "Update to $VER"
|
||||||
|
|
||||||
|
# CLeanup
|
||||||
|
rm -rf pkg/ src/ *.snap *.pkg.tar.zst
|
||||||
|
|
||||||
|
printf "\nAll done!\nRemember to git push!\n"
|
||||||
Loading…
Reference in New Issue