bottle-imp icon indicating copy to clipboard operation
bottle-imp copied to clipboard

Smile, you are in AUR!

Open whoisroot opened this issue 1 year ago • 0 comments

I made a hacky bash script to automatically fetch the PKGBUILD from the repo and update the AUR package. I have it running on a cronjob every 6 hours.

If you ever update bottle-imp, the AUR package updates automagically!

#!/bin/bash

wget -O PKGBUILD.new "https://raw.githubusercontent.com/arkane-systems/bottle-imp/master/PKGBUILD" 2>/dev/null
diff -q PKGBUILD PKGBUILD.new > /dev/null
if [[ $? == 0 ]]; then
	echo "No updates"
	rm PKGBUILD.new 
else
	echo "New pkgver, updating and commiting"
	mv PKGBUILD{.new,}
	export $(grep -m 1 pkgver PKGBUILD)
	makepkg --printsrcinfo > .SRCINFO
	git add PKGBUILD .SRCINFO
	git commit -m "Updating PKGBUILD to ${pkgver}"
	git push
fi

whoisroot avatar Nov 21 '23 19:11 whoisroot