From 017536123a5d334759ed54aff610b22a8d6c8254 Mon Sep 17 00:00:00 2001 From: Ze Libertine Gamer Date: Thu, 3 Nov 2016 07:02:05 -0700 Subject: Improve error handling in shell scripts --- scripts/dupe-finder.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts/dupe-finder.sh') diff --git a/scripts/dupe-finder.sh b/scripts/dupe-finder.sh index dec0d68..93d84c9 100755 --- a/scripts/dupe-finder.sh +++ b/scripts/dupe-finder.sh @@ -1,7 +1,12 @@ -#!/bin/bash +#!/usr/bin/env bash # dupe-finder.sh: Output duplicate games in your database +# Set options for improved robustness +set -o errexit +set -o pipefail +set -o nounset + # 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 [[ -n $result ]]; then -- cgit v1.2.3-54-g00ecf