Skip to content

Commit fb21876

Browse files
committed
Add script to check for duplicate ids
1 parent 939a240 commit fb21876

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

dupes.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
OUTPUT=$(cat pools-v2.json | jq 'group_by(.id) | map(select(length>1) | .[])')
2+
3+
if [ "$OUTPUT" = "[]" ]; then
4+
echo "no duplicate pool ids found"
5+
exit 0
6+
else
7+
echo "duplicate pool ids found: $OUTPUT"
8+
exit 1
9+
fi

0 commit comments

Comments
 (0)