From: Michael Jeanson Date: Mon, 28 Aug 2023 18:33:45 +0000 (-0400) Subject: jjb: lttng-modules: fix shellcheck warnings in param build script X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=efdab1b70297ad807c5197f9e0e9e1e43d5b01a0;p=lttng-ci.git jjb: lttng-modules: fix shellcheck warnings in param build script Change-Id: I67a8318465914ebd9553b917d7ebf82b953012e9 Signed-off-by: Michael Jeanson --- diff --git a/scripts/lttng-modules/param-build.sh b/scripts/lttng-modules/param-build.sh index fd13877..69a3338 100644 --- a/scripts/lttng-modules/param-build.sh +++ b/scripts/lttng-modules/param-build.sh @@ -149,7 +149,7 @@ select_compiler() { selected_cc='gcc-4.8' fi - if [ "x$selected_cc" = "x" ]; then + if [ -z "$selected_cc" ]; then echo "Found no suitable compiler." exit 1 fi @@ -623,12 +623,12 @@ extract_distro_headers() { # Copy arch includes (find arch -name include -type d -print0 | \ - xargs -0 -n1 -i: find : -type f) | \ + xargs -0 -n1 -I '{}' find '{}' -type f) | \ cpio -pd --preserve-modification-time "${LINUX_HDROBJ_DIR}" # Copy arch scripts (find arch -name scripts -type d -print0 | \ - xargs -0 -n1 -i: find : -type f) | \ + xargs -0 -n1 -I '{}' find '{}' -type f) | \ cpio -pd --preserve-modification-time "${LINUX_HDROBJ_DIR}" # Cleanup scripts @@ -637,7 +637,7 @@ extract_distro_headers() { # On powerpc 32bits this object is required to link modules if [ "${karch}" = "powerpc" ]; then - if [ "x$(scripts/config -s CONFIG_PPC64)" = "xy" ] && vergte "${kversion}" "5.4"; then + if [ "$(scripts/config -s CONFIG_PPC64)" = "y" ] && vergte "${kversion}" "5.4"; then : else cp -a --parents arch/powerpc/lib/crtsavres.[So] "${LINUX_HDROBJ_DIR}/" @@ -701,7 +701,7 @@ extract_distro_headers() { # On powerpc 32bits this object is required to link modules if [ "${karch}" = "powerpc" ]; then - if [ "x$(scripts/config -s CONFIG_PPC64)" = "xy" ] && vergte "${kversion}" "5.4"; then + if [ "$(scripts/config -s CONFIG_PPC64)" = "y" ] && vergte "${kversion}" "5.4"; then : else make arch/powerpc/lib/crtsavres.o "${make_args[@]}" @@ -920,7 +920,7 @@ signature_v2 = False" > "$WORKSPACE/.s3cfg" url_hash="$(echo -n "$kgitrepo" | md5sum | awk '{ print $1 }')" obj_name="linux.tar.bz2" -if [ "x${cross_arch}" = "x" ]; then +if [ -z "${cross_arch}" ]; then obj_url_prefix="$OBJ_STORE_URL/linux-build/$url_hash/$ktag/platform-${platforms}/$arch/native" else obj_url_prefix="$OBJ_STORE_URL/linux-build/$url_hash/$ktag/platform-${platforms}/${cross_arch}"