Files
kata-containers/tools/packaging/static-build/agent/build-static-agent.sh
Fabiano Fidêncio e407c7ee95 tools: Fix shellcheck issues in build-static-agent.sh
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 <ffidencio@nvidia.com>
Made-with: Cursor
2026-04-24 08:14:08 +02:00

28 lines
637 B
Bash
Executable File

#!/usr/bin/env bash
#
# Copyright (c) 2023 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
set -o errexit
set -o nounset
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() {
echo "build agent from source"
/usr/bin/install_libseccomp.sh /opt /opt
cd src/agent
# 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 "$@"