packaging: make install_oras.sh to run curl without sudo

sudo hides the environment variables that are sometimes
useful with the builds (for example: proxy settings).

While install_oras.sh could run completely without sudo in
the container it's COPY'd to, make minimal changes to it
to keep it functional outside the container too while still
addressing the problem of 'sudo curl' not working with proxy
env variables.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
This commit is contained in:
Mikko Ylinen 2025-02-14 14:55:43 +02:00
parent 0d8242aee4
commit 926119040c

View File

@ -37,7 +37,7 @@ fi
oras_tarball="oras_${oras_required_version#v}_linux_${arch}.tar.gz"
echo "Downloading ORAS ${oras_required_version}"
sudo curl -OL https://github.com/oras-project/oras/releases/download/${oras_required_version}/${oras_tarball}
curl -OL https://github.com/oras-project/oras/releases/download/${oras_required_version}/${oras_tarball}
echo "Installing ORAS to ${install_dest}"
sudo mkdir -p "${install_dest}"