summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Barri2021-04-23 08:28:17 +1000
committerDavid Barri2021-04-23 08:28:17 +1000
commitdeca2bd1270efd21b1a8bae3b235581f27bc7704 (patch)
tree0ed54bf6f86a41b106df5daf5e2db78c678125e6
parentcd9bb734691a9703f72755df73de00eb7059b882 (diff)
downloadaur-deca2bd1270efd21b1a8bae3b235581f27bc7704.tar.gz
Use external aur script
-rw-r--r--Makefile34
-rw-r--r--aur-cfg.sh7
2 files changed, 7 insertions, 34 deletions
diff --git a/Makefile b/Makefile
deleted file mode 100644
index bd72f951eb6..00000000000
--- a/Makefile
+++ /dev/null
@@ -1,34 +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/CryptoGraphics/VerthashMiner/releases/latest | perl -pe 's!.*/tag/v?([0-9].+?)".*!$$1!')
-
-versions:
- @echo "Current version:"
- @echo " $(CURRENT_VER)"
- @echo "Latest version:"
- @echo " $(LATEST_VER)"
-
-test-upgrade:
- perl -pi -e 's/^pkgver=.+/pkgver=$(LATEST_VER)/' PKGBUILD
- bash -c 'perl -pi -e "s/^sha256sums=[^)]+\)/$$(makepkg -g)/" PKGBUILD'
-
-upgrade:
- @make test-upgrade
- @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 upgrade && git push
-endif
diff --git a/aur-cfg.sh b/aur-cfg.sh
new file mode 100644
index 00000000000..07605561c73
--- /dev/null
+++ b/aur-cfg.sh
@@ -0,0 +1,7 @@
+function get_latest_version {
+ curl -s https://github.com/CryptoGraphics/VerthashMiner/releases/latest | perl -pe 's!.*/tag/v?([0-9].+?)".*!$1!'
+}
+
+function clean_downloads {
+ rm -vf VerthashMiner-*.tar.gz
+}