mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	Fix minor shellcheck 0.7.2 warnings
The first warning of a misspelling is a false positive, so we annotate
the script accordingly.  As for the x-prefix warnings update the check
to use the conventional '[ -z <string> ]' syntax.
all-syslog.sh:46:47: warning: Possible misspelling: ZEVENT_ZIO_OBJECT
    may not be assigned, but ZEVENT_ZIO_OBJSET is. [SC2153]
make_gitrev.sh:53:6: note: Avoid x-prefix in comparisons as it no
    longer serves a purpose [SC2268]
man-dates.sh:10:7: note: Avoid x-prefix in comparisons as it no
    longer serves a purpose [SC2268]
Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12208
			
			
This commit is contained in:
		
							parent
							
								
									6ce97bb4a2
								
							
						
					
					
						commit
						1180d61152
					
				| @ -42,6 +42,7 @@ fi | |||||||
|     msg="${msg} delay=$((ZEVENT_ZIO_DELAY / 1000000))ms" |     msg="${msg} delay=$((ZEVENT_ZIO_DELAY / 1000000))ms" | ||||||
| 
 | 
 | ||||||
| # list the bookmark data together | # list the bookmark data together | ||||||
|  | # shellcheck disable=SC2153 | ||||||
| [ -n "${ZEVENT_ZIO_OBJSET}" ] && \ | [ -n "${ZEVENT_ZIO_OBJSET}" ] && \ | ||||||
|     msg="${msg} bookmark=${ZEVENT_ZIO_OBJSET}:${ZEVENT_ZIO_OBJECT}:${ZEVENT_ZIO_LEVEL}:${ZEVENT_ZIO_BLKID}" |     msg="${msg} bookmark=${ZEVENT_ZIO_OBJSET}:${ZEVENT_ZIO_OBJECT}:${ZEVENT_ZIO_LEVEL}:${ZEVENT_ZIO_BLKID}" | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -50,7 +50,7 @@ esac | |||||||
| ZFS_GITREV=$({ cd "${top_srcdir}" && | ZFS_GITREV=$({ cd "${top_srcdir}" && | ||||||
| 	git describe --always --long --dirty 2>/dev/null; } || :) | 	git describe --always --long --dirty 2>/dev/null; } || :) | ||||||
| 
 | 
 | ||||||
| if [ "x${ZFS_GITREV}" = x ] | if [ -z "${ZFS_GITREV}" ] | ||||||
| then | then | ||||||
| 	# If the source directory is not a git repository, check if the file | 	# If the source directory is not a git repository, check if the file | ||||||
| 	# already exists (in the source) | 	# already exists (in the source) | ||||||
|  | |||||||
| @ -7,6 +7,6 @@ set -eu | |||||||
| 
 | 
 | ||||||
| find man -type f | while read -r i ; do | find man -type f | while read -r i ; do | ||||||
|     git_date=$(git log -1 --date=short --format="%ad" -- "$i") |     git_date=$(git log -1 --date=short --format="%ad" -- "$i") | ||||||
|     [ "x$git_date" = "x" ] && continue |     [ -z "$git_date" ] && continue | ||||||
|     sed -i "s|^\.Dd.*|.Dd $(date -d "$git_date" "+%B %-d, %Y")|" "$i" |     sed -i "s|^\.Dd.*|.Dd $(date -d "$git_date" "+%B %-d, %Y")|" "$i" | ||||||
| done | done | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Brian Behlendorf
						Brian Behlendorf