mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-12 10:16:48 +00:00
Fix shellcheck warnings and notes identified by running shellcheck --severity=style. Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
30 lines
831 B
Bash
Executable File
30 lines
831 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Copyright (c) 2024 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"
|
|
|
|
[[ -n "${pause_image_repo}" ]] || die "failed to get pause-image repo"
|
|
[[ -n "${pause_image_version}" ]] || die "failed to get pause-image version"
|
|
|
|
pull_pause_image_from_remote() {
|
|
echo "pull pause image from remote"
|
|
|
|
skopeo copy "${pause_image_repo}":"${pause_image_version}" oci:pause:"${pause_image_version}"
|
|
# shellcheck disable=SC2154
|
|
rm -rf "${DESTDIR}/pause_bundle"
|
|
umoci unpack --rootless --image pause:"${pause_image_version}" "${DESTDIR}/pause_bundle"
|
|
rm "${DESTDIR}/pause_bundle/umoci.json"
|
|
}
|
|
|
|
pull_pause_image_from_remote "$@"
|