From eea5a90f549b9aa28eac3fe0e3d6ea35ea422f82 Mon Sep 17 00:00:00 2001 From: ale5000 <15793015+ale5000-git@users.noreply.github.com> Date: Wed, 9 Oct 2024 00:43:38 +0200 Subject: [PATCH] Minor changes --- tools/bits-info.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/bits-info.sh b/tools/bits-info.sh index a4e2d155..bef69b5c 100755 --- a/tools/bits-info.sh +++ b/tools/bits-info.sh @@ -640,19 +640,20 @@ 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 + printf '%s %s\n' "${_shell_name:-unknown}" "${_shell_version:-unknown}" }