aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-08 11:32:11 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-08 11:36:11 +1200
commitad556d77e1934f551f2d3515f64b1c1eb8a30b6f (patch)
tree4ea2993702021fd19e7472a56213299a0ff6c970 /bin
parentMake gms(1) POSIX sh(1) (diff)
downloaddotfiles-ad556d77e1934f551f2d3515f64b1c1eb8a30b6f.tar.gz
dotfiles-ad556d77e1934f551f2d3515f64b1c1eb8a30b6f.zip
Make tests of tempdir var more explicit
I'm pretty sure I've seen at least one implementation of sh(1) upset about [ "$var" ] over [ -n "$var" ]
Diffstat (limited to 'bin')
-rwxr-xr-xbin/rndl2
-rwxr-xr-xbin/tlcs2
-rwxr-xr-xbin/try2
-rwxr-xr-xbin/urlc2
4 files changed, 4 insertions, 4 deletions
diff --git a/bin/rndl b/bin/rndl
index c4b9e29c..cb8ac5cc 100755
--- a/bin/rndl
+++ b/bin/rndl
@@ -3,7 +3,7 @@
if [ "$#" -eq 0 ] ; then
td=
cleanup() {
- [ "$td" ] && rm -fr -- "$td"
+ [ -n "$td" ] && rm -fr -- "$td"
if [ "$1" != EXIT ] ; then
trap - "$1"
kill "-$1" "$$"
diff --git a/bin/tlcs b/bin/tlcs
index 80fca373..dcd76c7d 100755
--- a/bin/tlcs
+++ b/bin/tlcs
@@ -70,7 +70,7 @@ fi
# Temporary directory for the FIFOs
td=
cleanup() {
- [ "$td" ] && rm -fr -- "$td"
+ [ -n "$td" ] && rm -fr -- "$td"
if [ "$1" != EXIT ] ; then
trap - "$1"
kill "-$1" "$$"
diff --git a/bin/try b/bin/try
index f0cfddf5..f0ba317d 100755
--- a/bin/try
+++ b/bin/try
@@ -29,7 +29,7 @@ fi
# Create a buffer file for the error output, and clean up the file when we exit
td=
cleanup() {
- [ "$td" ] && rm -fr -- "$td"
+ [ -n "$td" ] && rm -fr -- "$td"
if [ "$1" != EXIT ] ; then
trap - "$1"
kill "-$1" "$$"
diff --git a/bin/urlc b/bin/urlc
index 351d8623..b898b99c 100755
--- a/bin/urlc
+++ b/bin/urlc
@@ -9,7 +9,7 @@ tm=${URLCHECK_TIMEOUT:-8}
# exit
td=
cleanup() {
- [ "$td" ] && rm -fr -- "$td"
+ [ -n "$td" ] && rm -fr -- "$td"
if [ "$1" != EXIT ] ; then
trap - "$1"
kill "-$1" "$$"