From f86fcbd609b4e8e54fb22093b941a751398814ce Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 29 Apr 2021 01:15:47 +0200 Subject: [PATCH] Fix shellcheck issues (#1341) * Fix issue with latest shellcheck version The latest shellcheck versions use a new error number for non-POSIX string replacement. Change to ignore this new error number. * Ignore shellcheck issue about not following sourced files Newer shellcheck versions also warn when shellcheck does not follow sourcing of files with known path: Not following: ./meta was not specified as input (see shellcheck -x). We check those files separately so ignore this error for the two scripts affected. --- buildroot-external/ota/rauc-hook | 4 ++-- buildroot-external/scripts/post-build.sh | 2 +- buildroot-external/scripts/post-image.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/buildroot-external/ota/rauc-hook b/buildroot-external/ota/rauc-hook index 01244bd16..7759a1fb1 100755 --- a/buildroot-external/ota/rauc-hook +++ b/buildroot-external/ota/rauc-hook @@ -9,13 +9,13 @@ case "$1" in exit 0 fi # Be compatible with hassos OS ID - # shellcheck disable=SC2039 + # shellcheck disable=SC3060 rauc_os_compatible=${RAUC_MF_COMPATIBLE/haos-/hassos-} if [ "$rauc_os_compatible" = "$RAUC_SYSTEM_COMPATIBLE" ]; then exit 0 fi # generic-x86-64: Be compatible with intel-nuc - # shellcheck disable=SC2039 + # shellcheck disable=SC3060 rauc_board_compatible=${rauc_os_compatible/generic-x86-64/intel-nuc} if [ "${rauc_board_compatible}" = "$RAUC_SYSTEM_COMPATIBLE" ]; then exit 0 diff --git a/buildroot-external/scripts/post-build.sh b/buildroot-external/scripts/post-build.sh index f72e01029..f36286dd5 100755 --- a/buildroot-external/scripts/post-build.sh +++ b/buildroot-external/scripts/post-build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# shellcheck disable=SC1090 +# shellcheck disable=SC1090,SC1091 set -e SCRIPT_DIR=${BR2_EXTERNAL_HASSOS_PATH}/scripts diff --git a/buildroot-external/scripts/post-image.sh b/buildroot-external/scripts/post-image.sh index 10df39bd2..b1c174d0d 100755 --- a/buildroot-external/scripts/post-image.sh +++ b/buildroot-external/scripts/post-image.sh @@ -1,5 +1,5 @@ #!/bin/bash -# shellcheck disable=SC1090 +# shellcheck disable=SC1090,SC1091 set -e SCRIPT_DIR=${BR2_EXTERNAL_HASSOS_PATH}/scripts