nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1#!/usr/bin/env nix-shell
2#!nix-shell -i bash -p curl pcre common-updater-scripts
3
4set -eu -o pipefail
5
6# Expect the text in format of '<a href="official/postfix-3.7.4.tar.gz">Source code</a> |'
7# Stable release goes first.
8new_version="$(curl -s https://postfix-mirror.horus-it.com/postfix-release/index.html |
9 pcregrep -o1 '"official/postfix-([0-9.]+)[.]tar[.]gz">' | head -n1)"
10update-source-version postfix "$new_version"