diff --git a/src/libs/protocols/hack/update-generated-proto.sh b/src/libs/protocols/hack/update-generated-proto.sh index 64952b03c4f5..67f25058aab8 100755 --- a/src/libs/protocols/hack/update-generated-proto.sh +++ b/src/libs/protocols/hack/update-generated-proto.sh @@ -7,14 +7,14 @@ # // die() { - cat <&2 + cat <&2 ==================================================================== ==== compile protocols failed ==== $1 ==================================================================== -EOT +EOF exit 1 } diff --git a/tools/osbuilder/image-builder/image_builder.sh b/tools/osbuilder/image-builder/image_builder.sh index 5d01b0a2d840..8b65ab4e8f21 100755 --- a/tools/osbuilder/image-builder/image_builder.sh +++ b/tools/osbuilder/image-builder/image_builder.sh @@ -72,7 +72,7 @@ readonly mem_boundary_mb=128 source "${lib_file}" usage() { - cat < This script will create a Kata Containers image file of an adequate size based on the directory. @@ -117,7 +117,7 @@ Kernels and hypervisors that support DAX/NVDIMM read the MBR #2, otherwise MBR # [1] - https://github.com/kata-containers/kata-containers/blob/main/tools/osbuilder/image-builder/nsdax.gpl.c [2] - https://github.com/torvalds/linux/blob/master/drivers/nvdimm/pfn.h -EOT +EOF } diff --git a/tools/osbuilder/initrd-builder/initrd_builder.sh b/tools/osbuilder/initrd-builder/initrd_builder.sh index 1d4a60d52427..fb95f6a38c40 100755 --- a/tools/osbuilder/initrd-builder/initrd_builder.sh +++ b/tools/osbuilder/initrd-builder/initrd_builder.sh @@ -23,7 +23,7 @@ AGENT_INIT=${AGENT_INIT:-no} usage() { error="${1:-0}" - cat < This script creates a Kata Containers initrd image file based on the directory. @@ -38,7 +38,7 @@ Extra environment variables: DEFAULT: kata-agent AGENT_INIT: use kata agent as init process DEFAULT: no -EOT +EOF exit "${error}" } diff --git a/tools/osbuilder/rootfs-builder/rootfs.sh b/tools/osbuilder/rootfs-builder/rootfs.sh index 80633a04518b..a7d1a0a3bebc 100755 --- a/tools/osbuilder/rootfs-builder/rootfs.sh +++ b/tools/osbuilder/rootfs-builder/rootfs.sh @@ -63,7 +63,7 @@ typeset init= usage() { error="${1:-0}" - cat < "$unitFile" << EOT + cp ./usr/share/systemd/tmp.mount "$unitFile" || cat > "$unitFile" << EOF # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it @@ -496,7 +496,7 @@ What=tmpfs Where=/tmp Type=tmpfs Options=mode=1777,strictatime,nosuid,nodev -EOT +EOF fi popd >> /dev/null @@ -519,12 +519,12 @@ EOT esac info "Configure chrony file ${chrony_conf_file}" - cat >> "${chrony_conf_file}" <> "${chrony_conf_file}" <"$file"<<-EOT + cat >"$file"<<-EOF --- osbuilder: url: "${osbuilder_url}" @@ -190,7 +190,7 @@ ${extra} name: "${AGENT_BIN}" version: "${agent_version}" agent-is-init-daemon: "${AGENT_INIT}" -EOT +EOF local rootfs_file="${file_dir}/$(basename "${file}")" info "Created summary file '${rootfs_file}' inside rootfs" diff --git a/tools/osbuilder/tests/test_images.sh b/tools/osbuilder/tests/test_images.sh index fbbe5d5901ed..5def439b7cb3 100755 --- a/tools/osbuilder/tests/test_images.sh +++ b/tools/osbuilder/tests/test_images.sh @@ -53,7 +53,7 @@ source "${project_dir}/scripts/lib.sh" usage() { - cat <] Options: @@ -72,7 +72,7 @@ Otherwise, tests are run on all distros. $(basename ${test_config}) includes a list of distros to exclude from testing, depending on the detected test environment. However, when a is specified, distro exclusion based on $(basename ${test_config}) is not enforced. -EOT +EOF } # Add an entry to the specified stats file diff --git a/tools/packaging/guest-image/build_image.sh b/tools/packaging/guest-image/build_image.sh index d3dc0c54d718..3913df51d1d6 100755 --- a/tools/packaging/guest-image/build_image.sh +++ b/tools/packaging/guest-image/build_image.sh @@ -59,7 +59,7 @@ build_image() { usage() { return_code=${1:-0} - cat < : Hypervisor_target. -v : Kernel version to use if kernel path not provided. -x : Confidential guest protection type, such as sev and tdx -EOT +EOF exit "$exit_code" } diff --git a/tools/packaging/release/publish-kata-image.sh b/tools/packaging/release/publish-kata-image.sh index 49613ac82b69..1240e4f5dd14 100755 --- a/tools/packaging/release/publish-kata-image.sh +++ b/tools/packaging/release/publish-kata-image.sh @@ -28,7 +28,7 @@ die() { usage() { return_code=${1:-0} - cat < @@ -41,7 +41,7 @@ options: -h : show this help -p : push image to github -EOT +EOF exit "${return_code}" } diff --git a/tools/packaging/release/release-notes.sh b/tools/packaging/release/release-notes.sh index acf543bcfb15..4b7019466ab9 100755 --- a/tools/packaging/release/release-notes.sh +++ b/tools/packaging/release/release-notes.sh @@ -26,7 +26,7 @@ trap exit_handler EXIT usage() { return_code=${1:-} - cat < Args: @@ -37,7 +37,7 @@ new-release: new release version that will have the Example: ./${script_name} 1.2.0 1.2.1 > notes.md -EOT +EOF exit "${return_code}" } @@ -81,25 +81,25 @@ changes() { } print_release_notes() { - cat <>/dev/null - cat <>/dev/null rm -rf "${tmp_dir}/${repo}" done - cat < This script creates a new release for ${PROJECT}. It tags and create release for: -EOT +EOF for r in "${repos[@]}"; do echo " - ${r}" done - cat <"${notes_file}" + cat <"${notes_file}" # Kata Containers ${new_version} $(get_changes "$current_version") -EOT +EOF cat "${notes_file}" if (echo "${current_version}" | grep "alpha") && (echo "${new_version}" | grep -v "alpha");then @@ -282,7 +282,7 @@ EOT usage() { exit_code="$1" - cat < Args: @@ -293,7 +293,7 @@ Example: Options -h : Show this help -p : create a PR -EOT +EOF exit "$exit_code" } diff --git a/tools/packaging/scripts/apply_patches.sh b/tools/packaging/scripts/apply_patches.sh index de8580845179..e5092779f56f 100755 --- a/tools/packaging/scripts/apply_patches.sh +++ b/tools/packaging/scripts/apply_patches.sh @@ -12,7 +12,7 @@ script_dir="$(realpath $(dirname $0))" patches_dir="$1" if [ -z "$patches_dir" ]; then - cat <<-EOT + cat <<-EOF Apply patches to the sources at the current directory. Patches are expected to be named in the standard git-format-patch(1) format where @@ -30,7 +30,7 @@ if [ -z "$patches_dir" ]; then $0 PATCHES_DIR Where: PATCHES_DIR is the directory containing the patches - EOT + EOF exit 1 fi diff --git a/tools/packaging/scripts/configure-hypervisor.sh b/tools/packaging/scripts/configure-hypervisor.sh index 4db23ae6639d..1d3689927e57 100755 --- a/tools/packaging/scripts/configure-hypervisor.sh +++ b/tools/packaging/scripts/configure-hypervisor.sh @@ -72,7 +72,7 @@ die() { # Display usage to stdout. usage() { - cat < "$versions_txt" < "$versions_txt" < @@ -98,7 +98,7 @@ Options: --compare Only compare the kata version at branch with the one in ${versions_txt} and leave the file untouched. --head Use 's head to generate the versions file. -EOT +EOF exit "${exit_code}" } diff --git a/tools/packaging/static-build/shim-v2/install_go.sh b/tools/packaging/static-build/shim-v2/install_go.sh index cf4b311c41ff..4872dc49cf7c 100755 --- a/tools/packaging/static-build/shim-v2/install_go.sh +++ b/tools/packaging/static-build/shim-v2/install_go.sh @@ -31,7 +31,7 @@ info() { usage(){ exit_code="$1" - cat < : destination path, path where go will be installed. -f : enable force install, remove existent go pkg before installation. -h : display this help. -EOT +EOF exit "$exit_code" }