From fc4d160b55a2ec86b6f048b16f5c89d4cecfcb4e Mon Sep 17 00:00:00 2001 From: ZeLibertineGamer Date: Mon, 23 May 2016 03:34:58 -0700 Subject: Add duplicate game reporting script It'll serve as an example of how vgstash can be extended with minimal effort. --- scripts/dupe-finder.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 scripts/dupe-finder.sh (limited to 'scripts') diff --git a/scripts/dupe-finder.sh b/scripts/dupe-finder.sh new file mode 100755 index 0000000..9ffae6d --- /dev/null +++ b/scripts/dupe-finder.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# dupe-finder.sh: Output duplicate games in your database + +# 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 [[ -z $result ]]; then + exit +else + VGSTASH_TABLE_WIDTH=80 vgstash list | head -n 2 + echo "$result" +fi -- cgit v1.2.3-54-g00ecf