aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-02-25 00:37:43 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-02-25 00:37:43 +1300
commitd2687a18c9194a2b71b8c7258d1f956620d75d8e (patch)
treef89f28c9f768f4e236cc652589a7f9cff5e5e108
parentAdd an issue (diff)
downloaddotfiles-d2687a18c9194a2b71b8c7258d1f956620d75d8e.tar.gz
dotfiles-d2687a18c9194a2b71b8c7258d1f956620d75d8e.zip
Appease ShellCheck on osc(1df)
-rwxr-xr-xbin/osc5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/osc b/bin/osc
index a477c699..87f79365 100755
--- a/bin/osc
+++ b/bin/osc
@@ -5,7 +5,7 @@ self=osc
# Check we have openssl(1); we need to fail early lest we go setting up FIFOs
# needlessly
if ! command -v openssl >/dev/null 2>&1 ; then
- printf >&2 '%s: openssl(1) not found in $PATH\n'
+ printf >&2 '%s: openssl(1) not found\n' "$self"
exit 1
fi
@@ -55,7 +55,7 @@ set -- "$@" -connect "$host":"$serv"
# Do the POSIX dance to kill child processes and clean up temp files even if
# killed by a signal
-td= fil=
+td='' fil=''
cleanup() {
trap - EXIT "$1"
[ -n "$fil" ] && kill -TERM "$fil"
@@ -65,6 +65,7 @@ cleanup() {
fi
}
for sig in EXIT HUP INT TERM ; do
+ # shellcheck disable=SC2064
trap "cleanup $sig" "$sig"
done