Skip to content

Smile, you are in AUR! #44

@whoisroot

Description

@whoisroot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions