Skip to content

Commit

Permalink
grep only matching part of tags to prevent duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
edibotopic committed Sep 26, 2024
1 parent 0bf3376 commit 6f6d363
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metrics/scripts/build_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ links=0
images=0

# count number of links
links=$(find . -type d -path './.sphinx' -prune -o -name '*.html' -exec cat {} + | grep "<a " | wc -l)
links=$(find . -type d -path './.sphinx' -prune -o -name '*.html' -exec cat {} + | grep -o "<a " | wc -l)
# count number of images
images=$(find . -type d -path './.sphinx' -prune -o -name '*.html' -exec cat {} + | grep "<img " | wc -l)
images=$(find . -type d -path './.sphinx' -prune -o -name '*.html' -exec cat {} + | grep -o "<img " | wc -l)

# summarise latest metrics
echo "Summarising metrics for build files (.html)..."
Expand Down

0 comments on commit 6f6d363

Please sign in to comment.