#!/usr/bin/env bash

set -exo pipefail

curl https://api.github.com/repos/open-policy-agent/opa/releases/latest |
    grep 'browser_download_url.*linux_amd64' |
    cut -d : -f 2,3 |
    tr -d '"' |
    wget -qi -

chmod u+x opa_linux_amd64
ln -s opa_linux_amd64 opa

#!/usr/bin/env bash

set -exo pipefail

curl -vL https://api.github.com/repos/open-policy-agent/opa/releases/latest |
    grep 'browser_download_url.*linux_amd64' |
    cut -d : -f 2,3 |
    tr -d '"' |
    wget -qi -

chmod u+x opa_linux_amd64
ln -s opa_linux_amd64 opa

Fix OPA install script to follow redirects
Fix OPA install script to follow redirects

Enable verbose logging on curl because command is failing in Travis
but not locally.

Signed-off-by: Torin Sandall <933af5bec0bc58056526d55ca6c7b45fcf14cc48@gmail.com>
