diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2025-11-13 13:36:23 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2025-11-13 13:36:23 +0200 |
| commit | 9a5080d7be55b97ca61eda28327796c682db63dc (patch) | |
| tree | 5b3c599df19fc7f36fbab4d099a7961c971082d4 | |
| parent | 3df80b5afbebbf3af63b49fe98a3faecd2b68439 (diff) | |
Add "set -e" to all tools
| -rwxr-xr-x | tools/each | 2 | ||||
| -rwxr-xr-x | tools/filter | 2 | ||||
| -rwxr-xr-x | tools/map | 2 | ||||
| -rwxr-xr-x | tools/reduce | 2 | ||||
| -rwxr-xr-x | tools/splitat | 2 | ||||
| -rwxr-xr-x | tools/words | 2 |
6 files changed, 12 insertions, 0 deletions
@@ -1,5 +1,7 @@ #!/bin/sh +set -e + if [ -z "$1" ]; then echo "Usage: $0 <command>" echo "" diff --git a/tools/filter b/tools/filter index 94258d0..1c927be 100755 --- a/tools/filter +++ b/tools/filter @@ -1,5 +1,7 @@ #!/bin/sh +set -e + if [ -z "$1" ]; then echo "Usage: $0 <command>" echo "" @@ -1,5 +1,7 @@ #!/bin/sh +set -e + if [ -z "$1" ]; then echo "Usage: $0 <expr>" echo "" diff --git a/tools/reduce b/tools/reduce index effb98d..c88b0ba 100755 --- a/tools/reduce +++ b/tools/reduce @@ -1,5 +1,7 @@ #!/bin/sh +set -e + if [ "$#" -ne 2 ]; then echo "Usage: $0 <init> <expr>" echo "" diff --git a/tools/splitat b/tools/splitat index d41521e..4ca3ebd 100755 --- a/tools/splitat +++ b/tools/splitat @@ -1,5 +1,7 @@ #!/bin/sh +set -e + if [ "$#" -ne 1 ]; then echo "Usage: $0 <separator>" echo "" diff --git a/tools/words b/tools/words index ac76d0d..045c454 100755 --- a/tools/words +++ b/tools/words @@ -1,5 +1,7 @@ #!/bin/sh +set -e + if [ "$#" -ne 0 ]; then echo "Usage: $0" echo "" |
