summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorZeLibertineGamer <zlg@zlg.space>2016-05-23 03:34:58 -0700
committerZe Libertine Gamer <zlg@zlg.space>2016-05-23 03:34:58 -0700
commitfc4d160b55a2ec86b6f048b16f5c89d4cecfcb4e (patch)
tree91a88519a0cbb5774f2e691ac1d8b84e589497f3 /scripts
parentFix example command (diff)
downloadvgstash-fc4d160b55a2ec86b6f048b16f5c89d4cecfcb4e.tar.gz
vgstash-fc4d160b55a2ec86b6f048b16f5c89d4cecfcb4e.tar.bz2
vgstash-fc4d160b55a2ec86b6f048b16f5c89d4cecfcb4e.tar.xz
vgstash-fc4d160b55a2ec86b6f048b16f5c89d4cecfcb4e.zip
Add duplicate game reporting script
It'll serve as an example of how vgstash can be extended with minimal effort.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dupe-finder.sh12
1 files changed, 12 insertions, 0 deletions
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