From e407c7ee95fa991b93628de4983d2255fdf21df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 21 Apr 2026 18:15:35 +0200 Subject: [PATCH] tools: Fix shellcheck issues in build-static-agent.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address shellcheck warnings including proper variable quoting, use of [[ ]] over [ ], declaring and assigning variables separately, and adding appropriate shellcheck disable directives where needed. Signed-off-by: Fabiano FidĂȘncio Made-with: Cursor --- tools/packaging/static-build/agent/build-static-agent.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/packaging/static-build/agent/build-static-agent.sh b/tools/packaging/static-build/agent/build-static-agent.sh index 4652f5bb3d..f9211e71b6 100755 --- a/tools/packaging/static-build/agent/build-static-agent.sh +++ b/tools/packaging/static-build/agent/build-static-agent.sh @@ -10,6 +10,7 @@ set -o pipefail script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=/dev/null source "${script_dir}/../../scripts/lib.sh" build_agent_from_source() { @@ -18,8 +19,9 @@ build_agent_from_source() { /usr/bin/install_libseccomp.sh /opt /opt cd src/agent - DESTDIR=${DESTDIR} AGENT_POLICY=${AGENT_POLICY} INIT_DATA=${INIT_DATA} make - DESTDIR=${DESTDIR} AGENT_POLICY=${AGENT_POLICY} INIT_DATA=${INIT_DATA} make install + # shellcheck disable=SC2154 + DESTDIR="${DESTDIR}" AGENT_POLICY="${AGENT_POLICY}" INIT_DATA="${INIT_DATA}" make + DESTDIR="${DESTDIR}" AGENT_POLICY="${AGENT_POLICY}" INIT_DATA="${INIT_DATA}" make install } build_agent_from_source "$@"