nix-bitcoin/pkgs/krops/get-sha256.sh
Erik Arvstedt 5087ce245f
minor cleanups
- btcpayserver: remove unneeded trailing semicolons

- krops/get-sha256:
  `tail` is unneeded because `nix-prefetch-url` just outputs a single
  line containing the hash.
2021-09-11 15:07:23 +02:00

15 lines
393 B
Bash
Executable File

#! /usr/bin/env nix-shell
#! nix-shell -i bash -p git
set -euo pipefail
archive_hash () {
repo=$1
rev=$2
nix-prefetch-url --unpack "https://github.com/${repo}/archive/${rev}.tar.gz" 2> /dev/null
}
echo "Fetching latest krops commit"
latest=$(git ls-remote https://github.com/krebs/krops master | cut -f 1)
echo "rev: ${latest}"
echo "sha256: $(archive_hash krebs/krops $latest)"