aboutsummaryrefslogtreecommitdiff
path: root/scripts/dupe-finder.sh
blob: 93d84c9b99bd293b27048d7887390b646600abc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash

# dupe-finder.sh: Output duplicate games in your database

# Set options for improved robustness
set -o errexit
set -o pipefail
set -o nounset

# We're setting the envvar here to enforce the -w argument to uniq
result=$(VGSTASH_TABLE_WIDTH=80 vgstash list | uniq -D -f 2 -w 58)
if [[ -n $result ]]; then
	VGSTASH_TABLE_WIDTH=80 vgstash list | head -n 2
	echo "$result"
fi