Skip to content

Commit

Permalink
find duplicate cids
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckwagoncomputing committed Jun 29, 2023
1 parent 7abe22c commit f1eab3c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,11 @@ find pinoutstmp -type d -empty -delete
# This will get everything that didn't have a directory or title specified.
[ -d pinoutstmp ] && cp -r pinoutstmp/* pinouts/ && rm -r pinoutstmp

find pinouts/ -type f -name 'index.html' -print0 | while IFS= read -r -d '' f; do
DUPES=$(grep "cid\": " "$f" | uniq -d | tr -d '\n')
if [ -n "$DUPES" ]; then
if ! handle_warning "$WARNING_DUPE" "WARNING: Duplicate cids in $f: $DUPES"; then continue; fi
fi
done

echo "Completed processing $(echo -n "$CONNECTORS" | wc -l) mappings"

0 comments on commit f1eab3c

Please sign in to comment.