Skip to content

Commit

Permalink
Update bits-info.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git authored Oct 8, 2024
1 parent 02d9ec7 commit 9f2a7e7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tools/bits-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -640,20 +640,16 @@ get_shell_info()

_shell_version="${_shell_version#[Vv]ersion }"
case "${_shell_version}" in
'BusyBox '*)
_shell_name='busybox'
_shell_version="${_shell_version#BusyBox}"
;;
*' bash,'*)
_shell_name='bash' # Sometimes it isn't just a symlink but it is really called "sh" so we have to correct this
;;
'BusyBox '*) _shell_name='busybox' ;;
*' bash,'*) _shell_name='bash' ;; # Sometimes it isn't just a symlink but it is really called "sh" so we have to correct this
*)
test -z "${_shell_name}" || _shell_version="${_shell_version#"${_shell_name}"}"
;;
esac
_shell_version="${_shell_version# }"

case "${_shell_name}" in
'busybox') _shell_version="${_shell_version#BusyBox}" ;;
'osh') _shell_version="$(printf '%s\n' "${_shell_version}" | cut -f '1')" ;;
*) ;;
esac
Expand Down

0 comments on commit 9f2a7e7

Please sign in to comment.