summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Barri2021-04-23 08:13:06 +1000
committerDavid Barri2021-04-23 08:13:06 +1000
commit2d253000e780ff8970fba61341f10fabbda7b138 (patch)
tree0165d979a9b46d06a5b4a0350a5310d87e7c2837
parent07e38009a62291dd53afce21199bdb35c0c85f51 (diff)
downloadaur-2d253000e780ff8970fba61341f10fabbda7b138.tar.gz
Use external aur script
-rw-r--r--Makefile37
-rw-r--r--aur-cfg.sh7
2 files changed, 7 insertions, 37 deletions
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 44aa51e92fd8..000000000000
--- a/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-.PHONY: auto-update clean post test-upgrade upgrade versions
-
-CURRENT_VER := $(shell grep '^pkgver' PKGBUILD | sed 's/.*=//')
-LATEST_VER := $(shell curl -s https://github.com/tlaplus/tlaplus/releases/latest | perl -pe 's!.*/tag/v?([0-9].+?)".*!$$1!')
-
-versions:
- @echo "Current version:"
- @echo " $(CURRENT_VER)"
- @echo "Latest version:"
- @echo " $(LATEST_VER)"
-
-reset_pkgrel:
- perl -pi -e 's/^pkgrel=.+/pkgver=1/' PKGBUILD
-
-upgrade-1:
- perl -pi -e 's/^pkgver=.+/pkgver=$(LATEST_VER)/' PKGBUILD
- bash -c 'perl -0777 -pi -e "s/sha256sums=.+?\)/$$(makepkg -g)/s" PKGBUILD'
-
-upgrade:
- @make upgrade-1
- @make post
- git add .SRCINFO PKGBUILD
- git commit -m "Upgrade to $(LATEST_VER)" .SRCINFO PKGBUILD
-
-post:
- makepkg --verifysource -f
- makepkg --printsrcinfo > .SRCINFO
-
-clean:
- git clean -fX
-
-auto-update:
-ifeq ($(CURRENT_VER),$(LATEST_VER))
- @echo "No update available. Version: $(CURRENT_VER)"
-else
- @make reset_pkgrel && make upgrade && git push
-endif
diff --git a/aur-cfg.sh b/aur-cfg.sh
new file mode 100644
index 000000000000..b1d902a254fc
--- /dev/null
+++ b/aur-cfg.sh
@@ -0,0 +1,7 @@
+function get_latest_version {
+ curl -s https://github.com/tlaplus/tlaplus/releases/latest | perl -pe 's!.*/tag/v?([0-9].+?)".*!$1!'
+}
+
+function clean_downloads {
+ rm -vf *.jar
+}