aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-03 16:14:26 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-03 16:14:26 +1200
commit01a736840e66a9e7bc4104175b9f7de6279add04 (patch)
treea924c691460293a53d315adc54f6cea9e4e72cc0
parentCheck for too few args in tlcs(1) (diff)
downloaddotfiles-01a736840e66a9e7bc4104175b9f7de6279add04.tar.gz
dotfiles-01a736840e66a9e7bc4104175b9f7de6279add04.zip
Use self var in tlcs(1)
-rwxr-xr-xbin/tlcs5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/tlcs b/bin/tlcs
index 3b3265a4..12cd2c8e 100755
--- a/bin/tlcs
+++ b/bin/tlcs
@@ -1,5 +1,6 @@
#!/bin/sh
# Execute a command and tag the output of the stdout and stderr streams.
+self=tlcs
# Set the default prefixes and suffixes for stdout/err
out_pref='stdout: '
@@ -29,7 +30,7 @@ shift "$((OPTIND-1))"
# We need at least one more argument
if [ "$#" -eq 0 ] ; then
- printf >&2 'tlcs: Need a command to run\n'
+ printf >&2 '%s: Need a command to run\n' "$self"
exit 2
fi
@@ -74,7 +75,7 @@ cleanup() {
for sig in EXIT HUP INT TERM ; do
trap cleanup "$sig"
done
-td=$(mktd tlcs) || exit
+td=$(mktd "$self") || exit
# Execute the command, passing stdout and stderr to tl(1) calls as appropriate
# via named pipes