From 935ee90d9ff3af9ffc22735c0d6c092c5050f3ef Mon Sep 17 00:00:00 2001 From: Matthew Fisher <matt.fisher@microsoft.com> Date: Thu, 3 Oct 2019 14:51:19 -0700 Subject: [PATCH] fix(validate-license): update to work with newer versions of coreutils Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com> --- scripts/validate-license.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/validate-license.sh b/scripts/validate-license.sh index 12c76f75c..c4f02ba3e 100755 --- a/scripts/validate-license.sh +++ b/scripts/validate-license.sh @@ -27,7 +27,7 @@ find_files() { \( -name '*.go' -o -name '*.sh' -o -name 'Dockerfile' \) } -failed_license_header=($(find_files | xargs grep -L 'Licensed under the Apache License, Version 2.0 (the "License");')) +failed_license_header=($(grep -L 'Licensed under the Apache License, Version 2.0 (the "License");' $(find_files))) || : if (( ${#failed_license_header[@]} > 0 )); then echo "Some source files are missing license headers." for f in "${failed_license_header[@]}"; do @@ -36,7 +36,7 @@ if (( ${#failed_license_header[@]} > 0 )); then exit 1 fi -failed_copyright_header=($(find_files | xargs grep -L 'Copyright The Helm Authors.')) +failed_copyright_header=($(grep -L 'Copyright The Helm Authors.' $(find_files))) || : if (( ${#failed_copyright_header[@]} > 0 )); then echo "Some source files are missing the copyright header." for f in "${failed_copyright_header[@]}"; do -- GitLab