Skip to content

Instantly share code, notes, and snippets.

@henrytill
Last active November 10, 2015 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henrytill/7df0d6ebe6a20f977afc to your computer and use it in GitHub Desktop.
Save henrytill/7df0d6ebe6a20f977afc to your computer and use it in GitHub Desktop.
#! /usr/bin/env bash
channels=${1:-nixos-15.09-small nixos-15.09 nixos-unstable-small nixos-unstable nixpkgs-unstable}
site=${2:-https://nixos.org/channels}
getChannelVersion () {
basename $(curl -ILs -w %{url_effective} -o /dev/null $1) | cut -d - -f 2
}
for name in ${channels[@]}
do
printf '%-24s %s\n' $name $(getChannelVersion $site/$name)
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment