aboutsummaryrefslogtreecommitdiff
path: root/bin/osc.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-01-01 01:11:08 +1300
committerTom Ryder <tom@sanctum.geek.nz>2019-01-01 01:11:08 +1300
commite19bb8fb3c8350bee288327abd978a59eb3dc0f7 (patch)
tree754d2d883b27477f53f0fece44ef9edc7e4238f0 /bin/osc.sh
parentMerge branch 'release/v4.2.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-e19bb8fb3c8350bee288327abd978a59eb3dc0f7.tar.gz
dotfiles-e19bb8fb3c8350bee288327abd978a59eb3dc0f7.zip
Merge branch 'release/v4.3.0'v4.3.0
* release/v4.3.0: Bump VERSION Switch to using GNU Emacs on development machines Trim some trailing whitespace Clarify control flow in shell scripts Add clarifying comment Translate a short-circuit into a conditional Add a cheeky error message to sd() Strip trailing slashes from sd() target Correct error message from sd()
Diffstat (limited to 'bin/osc.sh')
-rw-r--r--bin/osc.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/osc.sh b/bin/osc.sh
index 86923f12..5def12ff 100644
--- a/bin/osc.sh
+++ b/bin/osc.sh
@@ -57,8 +57,12 @@ set -- "$@" -connect "$host":"$serv"
td='' fil=''
cleanup() {
trap - EXIT "$1"
- [ -n "$fil" ] && kill -TERM "$fil"
- [ -n "$td" ] && rm -fr -- "$td"
+ if [ -n "$fil" ] ; then
+ kill -TERM "$fil"
+ fi
+ if [ -n "$td" ] ; then
+ rm -fr -- "$td"
+ fi
if [ "$1" != EXIT ] ; then
kill -"$1" "$$"
fi