From 9d2f1c63af0fd40467a064a3eed080f128b040e4 Mon Sep 17 00:00:00 2001 From: aireilly Date: Sat, 2 Dec 2023 00:46:16 +0000 Subject: [PATCH] fix script to run in alpine container --- scripts/check-asciidoctor-build.sh | 4 ++-- scripts/get-updated-distros.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/check-asciidoctor-build.sh b/scripts/check-asciidoctor-build.sh index 377aa397fc..461f8a34b4 100755 --- a/scripts/check-asciidoctor-build.sh +++ b/scripts/check-asciidoctor-build.sh @@ -17,7 +17,7 @@ check_updated_assemblies () { if [ "${MODULES}" ] then # $UPDATED_ASSEMBLIES is the list of assemblies that contains changed modules - UPDATED_ASSEMBLIES=$(grep -rnwl "$REPO_PATH" --include=\*.adoc --exclude-dir={snippets,modules} -e "$MODULES") + UPDATED_ASSEMBLIES=$(grep -rnwl "$REPO_PATH" --exclude-dir={snippets,modules} -e "$MODULES" -- "*.adoc") # Exit 0 if there are no modified assemblies if [[ -z "${UPDATED_ASSEMBLIES}" ]] then @@ -38,7 +38,7 @@ check_updated_assemblies () { # search for files only, not folders PAGE="File: $(basename "$ASSEMBLY" .adoc)" # don't validate the assembly if it is not in a topic map - if grep -rq "$PAGE" --include "*.yml" _topic_maps ; then + if grep -rq "$PAGE" _topic_maps/*.yml; then # validate the assembly echo "Validating $ASSEMBLY ... 🚨" RED='\033[0;31m' diff --git a/scripts/get-updated-distros.sh b/scripts/get-updated-distros.sh index d639abcb7a..fce4905977 100755 --- a/scripts/get-updated-distros.sh +++ b/scripts/get-updated-distros.sh @@ -15,7 +15,7 @@ MODULES=$(echo "$FILES" | awk '/modules\/(.*)\.adoc/') if [ "${MODULES}" ] then # $UPDATED_ASSEMBLIES is the list of assemblies that contains changed modules - UPDATED_ASSEMBLIES=$(grep -rnwL "$REPO_PATH" --exclude-dir={snippets,modules} -e "$MODULES" -- "*.adoc") + UPDATED_ASSEMBLIES=$(grep -rnwl "$REPO_PATH" --exclude-dir={snippets,modules} -e "$MODULES" -- "*.adoc") # Exit 0 if there are no modified assemblies if [[ -z "${UPDATED_ASSEMBLIES}" ]]