aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorZeLibertineGamer <zlg@zlg.space>2016-05-20 09:01:53 -0700
committerZeLibertineGamer <zlg@zlg.space>2016-05-20 09:01:53 -0700
commite95e341c45e26fe6606e5b586dda71c2dc721e09 (patch)
tree15ffb32f5bcf4a8de1e0821f05ed8e5542ac19be /scripts
downloadvgstash-e95e341c45e26fe6606e5b586dda71c2dc721e09.tar.gz
vgstash-e95e341c45e26fe6606e5b586dda71c2dc721e09.tar.bz2
vgstash-e95e341c45e26fe6606e5b586dda71c2dc721e09.tar.xz
vgstash-e95e341c45e26fe6606e5b586dda71c2dc721e09.zip
Initial commit
I was dumb and didn't start committing as soon as I started. vgstash is considered ready for 0.1 and beta usage. There's a somewhat long road ahead, but I look forward to making this tool finally come to fruition.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/system-search.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/scripts/system-search.sh b/scripts/system-search.sh
new file mode 100755
index 0000000..329ead9
--- /dev/null
+++ b/scripts/system-search.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# system-search.sh: List all games from a specific system
+
+# Accepts either one argument (the system name), or the filter to send
+# to vgstash and then the system name.
+
+show_help() {
+ cat <<-FOOBAR
+ system-search.sh [filter] SYSTEM
+
+ filter: The filter to pass to vgstash. "all" by default
+ SYSTEM: The value in the System column to search for. Accepts
+ awk-style regex.
+
+ For example, to check which games for the NES that are in progress,
+ you would do:
+
+ system-search.sh incomplete NES
+FOOBAR
+}
+
+case $# in
+ 1)
+ filter="all"
+ system="$1"
+ ;;
+ 2)
+ filter="$1"
+ system="$2"
+ ;;
+ *)
+ show_help
+ ;;
+esac
+
+vgstash list "${filter}" | awk -F '|' "\$3 ~ \"${system}\""