mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user