Skip to content

Instantly share code, notes, and snippets.

@huseyin
Created October 16, 2017 13:38
Show Gist options
  • Save huseyin/acbae49d08de2ce5ac6aedce4b038f7c to your computer and use it in GitHub Desktop.
Save huseyin/acbae49d08de2ce5ac6aedce4b038f7c to your computer and use it in GitHub Desktop.
#!/bin/bash
pushd /tmp
rm -rf vagrant_*
wget -qO- https://releases.hashicorp.com/index.json >releases.json
version=$(cat releases.json | jq -r '.vagrant.versions | keys' | jq -r max)
package="vagrant_"$version"_x86_64.deb"
# Get package
wget "https://releases.hashicorp.com/vagrant/$version/$package"
# Add package to repo
sudo -u $USER aptly repo add omu vagrant_*_x86_64.deb || true
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment