diff options
-rwxr-xr-x | bin/apf | 3 | ||||
-rwxr-xr-x | bin/edda | 3 | ||||
-rwxr-xr-x | bin/eds | 3 | ||||
-rwxr-xr-x | bin/han | 4 |
4 files changed, 10 insertions, 3 deletions
@@ -2,6 +2,9 @@ # Prepend arguments from a file to a command call self=apf +# Give up completely if no BASH_VERSINFO (<2.0) +[ -n "$BASH_VERSINFO" ] || exit + # Require at least two arguments, give usage otherwise if (($# < 2)) ; then printf >&2 '%s: Need an arguments file and a command\n' "$self" @@ -2,6 +2,9 @@ # Run ed(1) over multiple files, duplicating stdin. self=edda +# Give up completely if no BASH_VERSINFO (<2.0) +[ -n "$BASH_VERSINFO" ] || exit + # Define usage function usage() { printf 'USAGE: %s [OPTS] [--] FILE1 [FILE2...]\n' "$self" @@ -2,6 +2,9 @@ # Create and edit executable scripts in a directory EDSPATH (defaults to ~/.local/bin) self=eds +# Give up completely if no BASH_VERSINFO (<2.0) +[ -n "$BASH_VERSINFO" ] || exit + # Define a function to show usage usage() { printf 'USAGE: %s [EDITOR_OPTS] [--] FILE1 [FILE2...]\n' \ @@ -3,9 +3,7 @@ self=han # Give up completely if no BASH_VERSINFO (<2.0) -if ! [ -n "$BASH_VERSINFO" ] ; then - exit -fi +[ -n "$BASH_VERSINFO" ] || exit # Figure out the options with which we can call help; Bash >=4.0 has an -m # option which prints the help output in a man-page like format. |