mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #76808 from SataQiu/fix-hack-shellcheck-20190419
Fix shellcheck failures of hack/verify-readonly-packages.sh
This commit is contained in:
		@@ -43,19 +43,13 @@ find_files() {
 | 
				
			|||||||
    \) -name '.readonly'
 | 
					    \) -name '.readonly'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
IFS=$'\n'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
conflicts=()
 | 
					conflicts=()
 | 
				
			||||||
while IFS=$'\n' read -r line; do
 | 
					while IFS=$'\n' read -r dir; do
 | 
				
			||||||
  conflicts+=( "$line" )
 | 
					 | 
				
			||||||
done < <(find_files | sed 's|/.readonly||' | while read -r dir; do
 | 
					 | 
				
			||||||
    dir=${dir#./}
 | 
					    dir=${dir#./}
 | 
				
			||||||
    if kube::util::has_changes "${branch}" "^${dir}/[^/]*\$" '/\.readonly$|/BUILD$|/zz_generated|/\.generated\.|\.proto$|\.pb\.go$' >/dev/null; then
 | 
					    if kube::util::has_changes "${branch}" "^${dir}/[^/]*\$" '/\.readonly$|/BUILD$|/zz_generated|/\.generated\.|\.proto$|\.pb\.go$' >/dev/null; then
 | 
				
			||||||
        echo "${dir}"
 | 
					        conflicts+=("${dir}")
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
done)
 | 
					done < <(find_files | sed 's|/.readonly||')
 | 
				
			||||||
 | 
					 | 
				
			||||||
unset IFS
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ ${#conflicts[@]} -gt 0 ]; then
 | 
					if [ ${#conflicts[@]} -gt 0 ]; then
 | 
				
			||||||
    exec 1>&2
 | 
					    exec 1>&2
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user