Add ShellCheck's --enable=all inside scripts/

Strengthen static code analysis for shell scripts.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Closes #12914
This commit is contained in:
Damian Szuberski
2022-01-13 19:09:19 +01:00
committed by GitHub
parent 8a7c4efd3c
commit 836136961a
10 changed files with 105 additions and 81 deletions
+4 -2
View File
@@ -25,7 +25,7 @@
# `configure` is run.
#
set -e -u
set -eu
dist=no
distdir=.
@@ -34,6 +34,7 @@ do
case $flag in
\?) echo "Usage: $0 [-D distdir] [file]" >&2; exit 1;;
D) dist=yes; distdir=${OPTARG};;
*) ;;
esac
done
shift $((OPTIND - 1))
@@ -45,6 +46,7 @@ GITREV="${1:-include/zfs_gitrev.h}"
case "${GITREV}" in
/*) echo "Error: ${GITREV} should be a relative path" >&2
exit 1;;
*) ;;
esac
ZFS_GITREV=$({ cd "${top_srcdir}" &&
@@ -60,7 +62,7 @@ then
'1s/^#define[[:blank:]]ZFS_META_GITREV "\([^"]*\)"$/\1/p' \
"${top_srcdir}/${GITREV}")
fi
elif [ ${dist} = yes ]
elif [ "${dist}" = yes ]
then
# Append -dist when creating distributed sources from a git repository
ZFS_GITREV="${ZFS_GITREV}-dist"