mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-27 11:31:05 +00:00
ci: shellcheck - collection of fixes
manual fixes of various issues. Related to: #10951 Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
This commit is contained in:
parent
f62e08998c
commit
7e11489daf
@ -95,7 +95,7 @@ list_issues_for_pr()
|
||||
echo "# Fields: issue_number"
|
||||
|
||||
local issue
|
||||
echo "${issues}"|while read issue
|
||||
echo "${issues}" | while read -r issue
|
||||
do
|
||||
printf "%s\n" "${issue}"
|
||||
done
|
||||
@ -112,7 +112,7 @@ list_labels_for_issue()
|
||||
|
||||
[[ -z "${labels}" ]] && die "cannot determine labels for issue ${issue}"
|
||||
|
||||
printf "${labels}"
|
||||
echo "${labels}"
|
||||
}
|
||||
|
||||
setup()
|
||||
@ -134,10 +134,11 @@ handle_args()
|
||||
case "${opt}" in
|
||||
h) usage && exit 0 ;;
|
||||
r) repo="${OPTARG}" ;;
|
||||
*) echo "use '-h' to get list of supprted aruments" && exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((${OPTIND} - 1))
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
local repo="${repo:-kata-containers/kata-containers}"
|
||||
local cmd="${1:-}"
|
||||
|
@ -8,7 +8,6 @@
|
||||
set -o errexit
|
||||
|
||||
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
script_name="$(basename "${BASH_SOURCE[0]}")"
|
||||
|
||||
source "${script_dir}/../tests/common.bash"
|
||||
|
||||
@ -47,7 +46,7 @@ gperf_tarball_url="${gperf_url}/${gperf_tarball}"
|
||||
|
||||
# We need to build the libseccomp library from sources to create a static library for the musl libc.
|
||||
# However, ppc64le and s390x have no musl targets in Rust. Hence, we do not set cflags for the musl libc.
|
||||
if ([[ "${arch}" != "ppc64le" ]] && [[ "${arch}" != "s390x" ]]); then
|
||||
if [[ "${arch}" != "ppc64le" ]] && [[ "${arch}" != "s390x" ]]; then
|
||||
# Set FORTIFY_SOURCE=1 because the musl-libc does not have some functions about FORTIFY_SOURCE=2
|
||||
cflags="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2"
|
||||
fi
|
||||
@ -71,7 +70,7 @@ build_and_install_gperf() {
|
||||
tar -xf "${gperf_tarball}"
|
||||
pushd "gperf-${gperf_version}"
|
||||
# Unset $CC for configure, we will always use native for gperf
|
||||
CC= ./configure --prefix="${gperf_install_dir}"
|
||||
CC="" ./configure --prefix="${gperf_install_dir}"
|
||||
make
|
||||
make install
|
||||
export PATH=${PATH}:"${gperf_install_dir}"/bin
|
||||
|
@ -107,8 +107,7 @@ function install_yq() {
|
||||
|
||||
## NOTE: ${var,,} => gives lowercase value of var
|
||||
local yq_url="https://${yq_pkg}/releases/download/${yq_version}/yq_${goos}_${goarch}"
|
||||
${precmd} curl -o "${yq_path}" -LSsf "${yq_url}"
|
||||
[[ $? -ne 0 ]] && die "Download ${yq_url} failed"
|
||||
${precmd} curl -o "${yq_path}" -LSsf "${yq_url}" || die "Download ${yq_url} failed"
|
||||
${precmd} chmod +x "${yq_path}"
|
||||
|
||||
if ! command -v "${yq_path}" >/dev/null; then
|
||||
|
Loading…
Reference in New Issue
Block a user