Skip to content

Commit

Permalink
Update scripts-testing.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git authored Oct 12, 2024
1 parent b6fa5be commit 921ba44
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/scripts-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,27 +93,29 @@ jobs:
}
skip()
{
local _s_shell
if test "${SH_IS_BASH:?}" = 'true'; then
case "${2:?}" in
bash) return 0 ;;
sh) return 1 ;;
bash) return 0 ;; # Skip
sh) return 1 ;; # Execute
*) ;;
esac
fi
_s_shell="$(basename "${3:?}")" || _s_shell="${3?}"
if test "${1:?}" = 'cmdline.sh'; then
case "${2:?}" in
sh | dash | busybox | ksh | mksh | zsh | bosh | pbosh | yash | posh) return 0 ;;
case "${_s_shell?}" in
dash | busybox | mksh | zsh | bosh | pbosh | yash | posh) return 0 ;; # Skip
*) ;;
esac
fi
return 1
return 1 # Execute
}
test_on_all_shells()
{
local _shell _shell_cmd _status
EXECUTED_LIST=''
for _shell in sh dash bash busybox ksh mksh zsh osh bosh yash posh hush; do
if skip "${1:?}" "${_shell:?}" || ! _shell_cmd="$(command -v "${_shell:?}")" || ! not_already_excuted "${_shell_cmd:?}"; then continue; fi
if ! _shell_cmd="$(command -v "${_shell:?}")" || skip "${1:?}" "${_shell:?}" "$(realpath ${_shell_cmd:?} || :)" || ! not_already_excuted "${_shell_cmd:?}"; then continue; fi
printf 'SHELL: %s - SCRIPT: %s\n\n' "${_shell_cmd:?}" "${1:?}"
_status='0'
if test "${_shell:?}" = 'busybox'; then
Expand Down

0 comments on commit 921ba44

Please sign in to comment.