Last active
November 10, 2015 21:10
-
-
Save henrytill/7df0d6ebe6a20f977afc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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