Show duplicates

This commit is contained in:
Eno Compton IV 2022-04-09 12:38:47 -06:00
parent 6696b57f9f
commit d6070af559

View file

@ -16,7 +16,10 @@ jobs:
run: npx markdown-link-check --config=.github/workflows/config.json README.md
- name: "Check for exactly 200 links"
run: |
if [ $(grep "\- \[" README.md | grep -Eo "https?://[^][ ]+" | sed 's/)//' | sort | uniq | wc -l) != 200 ]; then
all_links=$(grep "\- \[" README.md | grep -Eo "https?://[^][ ]+" | sed 's/)//' | sort)
if [ $(echo $all_links | uniq | wc -l) != 200 ]; then
echo "ERROR: List is not exactly 200 entries"
echo "DUPLICATES:"
echo $all_links | uniq -d
exit 1
fi