Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smile, you are in AUR! #44

Open
whoisroot opened this issue Nov 21, 2023 · 0 comments
Open

Smile, you are in AUR! #44

whoisroot opened this issue Nov 21, 2023 · 0 comments

Comments

@whoisroot
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant