Skip to content

Instantly share code, notes, and snippets.

@elazarl
Created June 28, 2016 19:31
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 elazarl/fc84b07d49a912cefc00cf42a2806287 to your computer and use it in GitHub Desktop.
Save elazarl/fc84b07d49a912cefc00cf42a2806287 to your computer and use it in GitHub Desktop.
List vagrant box download URLs
#!/bin/bash
if [ -z "$@" ]; then
echo Example usage:
echo $0 ubuntu/xenial64
echo Output:
echo https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160627.0.0/providers/virtualbox.box
echo https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160625.0.0/providers/virtualbox.box
echo ...
exit 1
fi
curl -L https://atlas.hashicorp.com/"$@" | jq -r '.versions[].providers[].url'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment