summarylogtreecommitdiffstats
path: root/updater.sh
blob: 125b8e896a57114b32523a5bf8934259de5117bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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