diff --git a/src/sgit/README.md b/src/sgit/README.md index 4355dec23..48920572a 100644 --- a/src/sgit/README.md +++ b/src/sgit/README.md @@ -70,7 +70,7 @@ usage: sgit [-h] [-V] [-v level] [-x] [-I] [-i extension] [-o sed_option(s)] [-s -s sed set path to sed -e command append sed command to list of commands to execute on globs -sgit version: 0.0.9-1 24-04-2023 +sgit version: 0.0.10-1 24-04-2023 ``` You **MUST** specify at least one `sed` command and one glob: the sed command by diff --git a/src/sgit/sgit.sh b/src/sgit/sgit.sh index 599c0ab9a..a06890680 100755 --- a/src/sgit/sgit.sh +++ b/src/sgit/sgit.sh @@ -21,7 +21,7 @@ # - Cody Boone Ferguson (@xexyl) # -export SGIT_VERSION="0.0.9-1 24-04-2023" # format: major.minor.patch-release DD-MM-YYYY +export SGIT_VERSION="0.0.10-1 24-04-2023" # format: major.minor.patch-release DD-MM-YYYY USAGE="usage: $(basename "$0") [-h] [-V] [-v level] [-x] [-I] [-i extension] [-o sed_option(s)] [-s sed] [-e command] @@ -93,7 +93,10 @@ while getopts :hVv:xIi:o:s:e: flag; do echo "$USAGE" 1>&2 exit 3 ;; - *) + *) echo "$0: ERROR: unexpected value from getopts: $flag" 1>&2 + echo 1>&2 + echo "$USAGE" 1>&2 + exit 3 ;; esac done @@ -104,7 +107,7 @@ shift $(( OPTIND - 1 )); # check that SED_COMMANDS is not empty! if [[ -z "${SED_COMMANDS[*]}" ]]; then - echo "$(basename "$0"): ERROR: you must specify at least one sed command" 1>&2 + echo "$(basename "$0"): ERROR: you must specify at least one sed command and one glob" 1>&2 echo 1>&2 echo "$USAGE" 1>&2 exit 2