aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-06-15 13:59:47 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-06-15 13:59:47 +1200
commit94341e6d65c4ef4c7645f95ad40ee42f835c6069 (patch)
treeb450debfbbe5cdc9632566f4c19818e2ec425e88 /bin
parent33bf5e3e5ffc127854d77ddd648b6451cf3e96ec (diff)
downloaddotfiles-94341e6d65c4ef4c7645f95ad40ee42f835c6069.tar.gz
dotfiles-94341e6d65c4ef4c7645f95ad40ee42f835c6069.zip
Clean up some exit statuses
Diffstat (limited to 'bin')
-rw-r--r--bin/fnl.sh2
-rw-r--r--bin/shb.sh6
-rw-r--r--bin/xgo.sh1
3 files changed, 5 insertions, 4 deletions
diff --git a/bin/fnl.sh b/bin/fnl.sh
index 8d771adb..86e582f1 100644
--- a/bin/fnl.sh
+++ b/bin/fnl.sh
@@ -3,7 +3,7 @@
# Check we have at least one argument
if [ "$#" -eq 0 ] ; then
printf >&2 'fnl: Command needed\n'
- return 2
+ exit 2
fi
# Create a temporary directory; note that we *don't* clean it up on exit
diff --git a/bin/shb.sh b/bin/shb.sh
index 7d31876d..d0279ce3 100644
--- a/bin/shb.sh
+++ b/bin/shb.sh
@@ -1,10 +1,10 @@
# Use PATH to build a shebang for a script given on stdin
self=shb
-# Need at least two arguments
+# Need at least one argument
if [ "$#" -lt 1 ] ; then
printf >&2 '%s: Need interpreter command\n' "$self"
- exit 1
+ exit 2
fi
# First argument is the name of the interpreter
@@ -23,4 +23,4 @@ set -- "$intp" "$@"
printf '#!%s\n' "$*"
# Emit the rest of the input
-cat
+cat -
diff --git a/bin/xgo.sh b/bin/xgo.sh
index 4d7cf922..3fb11fde 100644
--- a/bin/xgo.sh
+++ b/bin/xgo.sh
@@ -3,6 +3,7 @@
# Check arguments
if [ "$#" -eq 0 ] ; then
printf >&2 'xgo: At least one URL required\n'
+ exit 2
fi
# Iterate over the URL arguments