Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git committed Oct 16, 2024
1 parent 8108551 commit 9287bfd
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions tools/bits-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export POSIXLY_CORRECT='y'
$(set -o pipefail 1> /dev/null 2>&1) && set -o pipefail || :

readonly SCRIPT_NAME='Bits info'
readonly SCRIPT_VERSION='1.2'
readonly SCRIPT_VERSION='1.3'

command 1> /dev/null 2>&1 -v 'local' || {
\eval ' local() { :; } ' || : # Create a dummy "local" function for shells without support for local (example: ksh)
Expand Down Expand Up @@ -949,6 +949,8 @@ main()
}

execute_script='true'
STATUS=0

while test "${#}" -gt 0; do
case "${1}" in
-V | --version)
Expand Down Expand Up @@ -989,11 +991,21 @@ while test "${#}" -gt 0; do
shift
break
;;

-) # Get file list from STDIN
break
;;

--* | -*) ;; # Ignore unsupported options
--*)
execute_script='false'
printf 1>&2 '%s\n' "${SCRIPT_NAME}: unrecognized option '${1}'"
STATUS=2
;;
-*)
execute_script='false'
printf 1>&2 '%s\n' "${SCRIPT_NAME}: invalid option -- '${1#-}'"
STATUS=2
;;

*) break ;;
esac
Expand All @@ -1011,4 +1023,6 @@ if test "${execute_script}" = 'true'; then
fi

pause_if_needed "${?}"
elif test "${STATUS}" != 0; then
pause_if_needed "${STATUS}"
fi

0 comments on commit 9287bfd

Please sign in to comment.