From 9f2a7e726063a50d20156abdb7a7b3280eb6b31d Mon Sep 17 00:00:00 2001 From: ale5000 <15793015+ale5000-git@users.noreply.github.com> Date: Wed, 9 Oct 2024 00:42:59 +0200 Subject: [PATCH] Update bits-info.sh --- tools/bits-info.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tools/bits-info.sh b/tools/bits-info.sh index db3bff76..bef69b5c 100755 --- a/tools/bits-info.sh +++ b/tools/bits-info.sh @@ -640,13 +640,8 @@ 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}"}" ;; @@ -654,6 +649,7 @@ get_shell_info() _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