summary refs log tree commit diff
path: root/pkgs/games/minecraft/update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games/minecraft/update.sh')
-rwxr-xr-xpkgs/games/minecraft/update.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/games/minecraft/update.sh b/pkgs/games/minecraft/update.sh
new file mode 100755
index 00000000000..02b362e839b
--- /dev/null
+++ b/pkgs/games/minecraft/update.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl jq gnugrep common-updater-scripts
+
+set -eu -o pipefail
+
+version=$(curl -s 'https://aur.archlinux.org/rpc/?v=5&type=info&arg[]=minecraft-launcher' | jq '.results[0].Version' | grep -Po '[.\d]*(?=-)')
+update-source-version minecraft "$version"