Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git committed Oct 10, 2024
1 parent 8fa5fc2 commit b8a4ff8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cmdline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
if test "${A5K_FUNCTIONS_INCLUDED:-false}" = 'false'; then
main()
{
local _main_dir _is_busybox _applet _newline
local _main_dir _use_applets _applet _newline

_newline='
'
Expand Down Expand Up @@ -66,16 +66,16 @@ if test "${A5K_FUNCTIONS_INCLUDED:-false}" = 'false'; then
__SHELL_EXE="$(get_shell_exe)" || __SHELL_EXE='bash'
export __SHELL_EXE

_is_busybox='false'
_use_applets='false'
_applet=''
case "${__SHELL_EXE}" in
*'/busybox'*)
_is_busybox='true'
_use_applets='true'
_applet="${CUSTOM_APPLET:-ash}"
;;
*'/osh' | *'/oil.ovm' | *'/oils-for-unix')
_is_busybox='true' # ToDO: Rename '${_is_busybox}'
_applet="${CUSTOM_APPLET:-sh}"
_use_applets='true'
_applet="${CUSTOM_APPLET:-osh}"
;;
*) ;;
esac
Expand All @@ -90,13 +90,13 @@ if test "${A5K_FUNCTIONS_INCLUDED:-false}" = 'false'; then
if test "${ONLY_FOR_TESTING-}" = 'true'; then
printf '%s\n' "${__SHELL_EXE}"
printf '%s\n' "${_main_dir}"
if test "${_is_busybox}" = 'true'; then
if test "${_use_applets}" = 'true'; then
"${__SHELL_EXE}" "${_applet}" "${_main_dir}/includes/common.sh"
else
"${__SHELL_EXE}" "${_main_dir}/includes/common.sh"
fi
elif test "${_is_busybox}" = 'true'; then
exec "${_applet}" -s -c ". '${_main_dir}/includes/common.sh' || exit \${?}" "${_applet}" "${@}"
elif test "${_use_applets}" = 'true'; then
exec "${__SHELL_EXE}" "${_applet}" -s -c ". '${_main_dir}/includes/common.sh' || exit \${?}" "${_applet}" "${@}"
else
if test "${#}" -gt 0; then
case "${*}" in
Expand Down

0 comments on commit b8a4ff8

Please sign in to comment.