From ea27e2f021da9c4815d802deb6090c5904bc95b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 21 Apr 2026 18:38:03 +0200 Subject: [PATCH] tools: Fix shellcheck issues in install_oras.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix shellcheck warnings and notes identified by running shellcheck --severity=style. Signed-off-by: Fabiano FidĂȘncio --- .../local-build/dockerbuild/install_oras.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/packaging/kata-deploy/local-build/dockerbuild/install_oras.sh b/tools/packaging/kata-deploy/local-build/dockerbuild/install_oras.sh index fd381ef0a8..f270545290 100755 --- a/tools/packaging/kata-deploy/local-build/dockerbuild/install_oras.sh +++ b/tools/packaging/kata-deploy/local-build/dockerbuild/install_oras.sh @@ -12,7 +12,7 @@ set -o pipefail install_dest="/usr/local/bin" function get_installed_oras_version() { - oras version | grep Version | sed -e s/Version:// | tr -d [:blank:] + oras version | grep Version | sed -e s/Version:// | tr -d '[:blank:]' } oras_required_version="v1.2.0" @@ -24,20 +24,20 @@ if command -v oras; then echo "Proceeding to cleanup the previous installed version of ORAS, and install the version specified in the versions.yaml file" oras_system_path=$(which oras) - sudo rm -f ${oras_system_path} + sudo rm -f "${oras_system_path}" fi arch=$(uname -m) -if [ "${arch}" = "x86_64" ]; then +if [[ "${arch}" = "x86_64" ]]; then arch="amd64" fi -if [ "${arch}" = "aarch64" ]; then +if [[ "${arch}" = "aarch64" ]]; then arch="arm64" fi oras_tarball="oras_${oras_required_version#v}_linux_${arch}.tar.gz" echo "Downloading ORAS ${oras_required_version}" -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}"