Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ripgrep (rg) instead of grep where available #348

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion plat/unix/update_tags.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ if [ -f "$TAGS_FILE" ]; then
if [ "$UPDATED_SOURCE" != "" ]; then
echo "Removing references to: $UPDATED_SOURCE"
tab=" "
cmd="grep --text -Ev '^[^$tab]+$tab$UPDATED_SOURCE$tab' '$TAGS_FILE' > '$TAGS_FILE.temp'"
# use ripgrep if available
if which rg; then
cmd="rg --text -ev '^[^$tab]+$tab$UPDATED_SOURCE$tab' '$TAGS_FILE' > '$TAGS_FILE.temp'"
else
cmd="grep --text -Ev '^[^$tab]+$tab$UPDATED_SOURCE$tab' '$TAGS_FILE' > '$TAGS_FILE.temp'"
fi
echo "$cmd"
eval "$cmd" || true
INDEX_WHOLE_PROJECT=0
Expand Down