From 0db1b158584ee210dcc3d5e24f4a84ea71043bfe Mon Sep 17 00:00:00 2001 From: Ilyes Ben Dlala Date: Wed, 15 Dec 2021 13:31:21 +0100 Subject: [PATCH] Made "make docs" POSIX compliant to fix Helm-docs CI issue * The unsupported -d option in `read` is removed * filenames with line feeds are skipped Signed-off-by: Ilyes Ben Dlala --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ee7701dd50..cd1e26280e 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ hook-docs: # Start in the hooks folder cd hooks # https://github.com/koalaman/shellcheck/wiki/SC2044 - find . -type f -name Chart.yaml -print0 | while IFS= read -r -d '' chart; do + find . -type f ! -name "$(printf "*\n*")" -name Chart.yaml | while IFS= read -r chart; do ( dir="$$(dirname "$${chart}")" echo "Processing Helm Chart in $$dir" @@ -76,7 +76,7 @@ scanner-docs: # Start in the scanners folder cd scanners # https://github.com/koalaman/shellcheck/wiki/SC2044 - find . -type f -name Chart.yaml -print0 | while IFS= read -r -d '' chart; do + find . -type f ! -name "$(printf "*\n*")" -name Chart.yaml | while IFS= read -r chart; do ( dir="$$(dirname "$${chart}")" echo "Processing Helm Chart in $$dir" @@ -129,7 +129,7 @@ demo-apps-docs: # Start in the hooks folder cd demo-targets # https://github.com/koalaman/shellcheck/wiki/SC2044 - find . -type f -name Chart.yaml -print0 | while IFS= read -r -d '' chart; do + find . -type f ! -name "$(printf "*\n*")" -name Chart.yaml | while IFS= read -r chart; do ( dir="$$(dirname "$${chart}")" echo "Processing Helm Chart in $$dir"