summaryrefslogtreecommitdiff
path: root/scripts/helpers.sh
diff options
context:
space:
mode:
authorZe Libertine Gamer <zlg@zlg.space>2016-11-03 07:02:05 -0700
committerZe Libertine Gamer <zlg@zlg.space>2016-11-03 07:02:05 -0700
commit017536123a5d334759ed54aff610b22a8d6c8254 (patch)
tree416188c268a9f1621fa9ed183139fded80f837d7 /scripts/helpers.sh
parentCorrect run_again, add recursion (diff)
downloadvgstash-017536123a5d334759ed54aff610b22a8d6c8254.tar.gz
vgstash-017536123a5d334759ed54aff610b22a8d6c8254.tar.bz2
vgstash-017536123a5d334759ed54aff610b22a8d6c8254.tar.xz
vgstash-017536123a5d334759ed54aff610b22a8d6c8254.zip
Improve error handling in shell scripts
Diffstat (limited to 'scripts/helpers.sh')
-rw-r--r--scripts/helpers.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/helpers.sh b/scripts/helpers.sh
index 36320a1..f46e3f4 100644
--- a/scripts/helpers.sh
+++ b/scripts/helpers.sh
@@ -1,8 +1,13 @@
-#!/bin/bash
+#!/usr/bin/env bash
# This is a set of helper bash functions that are too small for their own file,
# but useful enough to be worth `source`ing in your bashrc.
+# Set options for improved robustness
+set -o errexit
+set -o pipefail
+set -o nounset
+
# Reports how many physical games you own
function vgphys() {
# Note: This assumes the system has an asterisk, "VC", or "Steam" in its name