Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1#!/usr/bin/env nix-shell
2#!nix-shell -i bash -p curl gnugrep common-updater-scripts
3set -euo pipefail
4
5owner=dubeyko
6repo=ssdfs-tools
7
8version="$(curl --silent https://raw.githubusercontent.com/${owner}/${repo}/master/configure.ac | \
9 grep 'AC_INIT(ssdfs' | \
10 egrep -o '[0-9\.]{3,}')"
11
12rev=$(curl -s -H "Accept: application/vnd.github.VERSION.sha" https://api.github.com/repos/${owner}/${repo}/commits/master)
13
14update-source-version ssdfs-utils "$version" --rev="$rev"