diff options
author | Ze Libertine Gamer <zlg@zlg.space> | 2016-11-03 07:02:05 -0700 |
---|---|---|
committer | Ze Libertine Gamer <zlg@zlg.space> | 2016-11-03 07:02:05 -0700 |
commit | 017536123a5d334759ed54aff610b22a8d6c8254 (patch) | |
tree | 416188c268a9f1621fa9ed183139fded80f837d7 /scripts/system-search.sh | |
parent | Correct run_again, add recursion (diff) | |
download | vgstash-017536123a5d334759ed54aff610b22a8d6c8254.tar.gz vgstash-017536123a5d334759ed54aff610b22a8d6c8254.tar.bz2 vgstash-017536123a5d334759ed54aff610b22a8d6c8254.tar.xz vgstash-017536123a5d334759ed54aff610b22a8d6c8254.zip |
Improve error handling in shell scripts
Diffstat (limited to '')
-rwxr-xr-x | scripts/system-search.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/system-search.sh b/scripts/system-search.sh index 329ead9..f1a1aad 100755 --- a/scripts/system-search.sh +++ b/scripts/system-search.sh @@ -1,10 +1,15 @@ -#!/bin/bash +#!/usr/bin/env 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. +# Set options for improved robustness +set -o errexit +set -o pipefail +set -o nounset + show_help() { cat <<-FOOBAR system-search.sh [filter] SYSTEM |