Skip to content

Instantly share code, notes, and snippets.

@steshaw
Created July 24, 2019 07:30
Show Gist options
  • Save steshaw/6e6e5e7115c4667930d06bf48ac7e836 to your computer and use it in GitHub Desktop.
Save steshaw/6e6e5e7115c4667930d06bf48ac7e836 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -euo pipefail
current=$(git rev-parse --abbrev-ref HEAD)
git checkout --quiet "${current}^"
before=$(nix path-info -S -f . linkchecker | tee /dev/tty | awk '{print $2}')
git checkout --quiet "${current}"
after=$(nix path-info -S -f . linkchecker | tee /dev/tty | awk '{print $2}')
echo "closure difference = $((after - before))"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment