https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
6 lines
344 B
Bash
Executable file
6 lines
344 B
Bash
Executable file
#! /usr/bin/env nix-shell
|
|
#! nix-shell -i bash -p common-updater-scripts curl jq
|
|
set -euo pipefail
|
|
|
|
COMMIT=$(curl "https://api.github.com/repos/v2fly/geoip/commits/release?per_page=1")
|
|
update-source-version v2ray-geoip "$(echo $COMMIT | jq -r .commit.message)" --file=pkgs/data/misc/v2ray-geoip/default.nix --rev="$(echo $COMMIT | jq -r .sha)"
|