diff --git a/main.sh b/main.sh index 69a1829..6ea16ba 100755 --- a/main.sh +++ b/main.sh @@ -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"