nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1#!/usr/bin/env nix-shell
2#!nix-shell -i bash -p curl pup common-updater-scripts
3
4set -eu -o pipefail
5
6version=$(
7 curl -s http://www.necessegame.com/server \
8 | pup 'a[href*="linux64"] text{}' \
9 | awk -F'[v ]' '/Linux64/ {print $4"-"$6}' \
10 | sort -Vu \
11 | tail -n1
12)
13
14[[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+\-[0-9]+$ ]] \
15 && update-source-version necesse-server "$version"