diff --git a/scripts/check-asciidoctor-build.sh b/scripts/check-asciidoctor-build.sh index 461f8a34b4..377aa397fc 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" --exclude-dir={snippets,modules} -e "$MODULES" -- "*.adoc") + UPDATED_ASSEMBLIES=$(grep -rnwl "$REPO_PATH" --include=\*.adoc --exclude-dir={snippets,modules} -e "$MODULES") # 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" _topic_maps/*.yml; then + if grep -rq "$PAGE" --include "*.yml" _topic_maps ; 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 fce4905977..db1fca51b7 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" --include=\*.adoc --exclude-dir={snippets,modules} -e "$MODULES") # Exit 0 if there are no modified assemblies if [[ -z "${UPDATED_ASSEMBLIES}" ]] @@ -36,7 +36,7 @@ for ASSEMBLY in $ALL_ASSEMBLIES; do # Search for files only, not folders PAGE="File: $(basename "$ASSEMBLY" .adoc)" # Don't include the assembly if it is not in a topic map - if grep -rq "$PAGE" _topic_maps/*.yml; then + if grep -rq "$PAGE" --include "*.yml" _topic_maps ; then DISTROS+=("$(grep -rl "$PAGE" _topic_maps/*.yml)") fi done