From 5358e3173e818089e277e91581d4d951f25e2df5 Mon Sep 17 00:00:00 2001 From: Ramesh Santhanakrishnan Date: Fri, 25 Aug 2023 16:31:38 -0700 Subject: [PATCH] Update per review comments --- plat/unix/update_tags.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 plat/unix/update_tags.sh diff --git a/plat/unix/update_tags.sh b/plat/unix/update_tags.sh old mode 100644 new mode 100755 index c00b2d8..b6aa5dd --- a/plat/unix/update_tags.sh +++ b/plat/unix/update_tags.sh @@ -100,11 +100,12 @@ if [ -f "$TAGS_FILE" ]; then echo "Removing references to: $UPDATED_SOURCE" tab=" " # use ripgrep if available - if which rg; then - cmd="rg --text -ev '^[^$tab]+$tab$UPDATED_SOURCE$tab' '$TAGS_FILE' > '$TAGS_FILE.temp'" + if command -v rg > /dev/null 2>&1; then + GREP_CMD="rg --noconfig" else - cmd="grep --text -Ev '^[^$tab]+$tab$UPDATED_SOURCE$tab' '$TAGS_FILE' > '$TAGS_FILE.temp'" + GREP_CMD="grep -E" fi + cmd="${GREP_CMD} --text -v '^[^$tab]+$tab$UPDATED_SOURCE$tab' '$TAGS_FILE' > '$TAGS_FILE.temp'" echo "$cmd" eval "$cmd" || true INDEX_WHOLE_PROJECT=0