Skip to content

Instantly share code, notes, and snippets.

@juhp
Last active January 6, 2017 09:22
Show Gist options
  • Save juhp/0f2454b46de997a12c3cddfd78335409 to your computer and use it in GitHub Desktop.
Save juhp/0f2454b46de997a12c3cddfd78335409 to your computer and use it in GitHub Desktop.
#!/bin/sh
# uses httpie for ease
#
# $ stckg-query.sh lts pandoc
# lts-7.14 pandoc-1.17.1
http --all -F -h https://www.stackage.org/$1/package/$2 | grep Location: | tail -1 | sed -e "s%Location: https://www.stackage.org/%%" -e "s%/package/% %"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment