remove sed

This commit is contained in:
Tobias Powalowski 2023-10-27 22:29:03 +02:00
parent 5d89e7e346
commit fdcf9ca1a2

View file

@ -172,15 +172,15 @@ _install_mods() {
# Checking kernel module dependencies:
# first try, pull in the easy modules
#shellcheck disable=SC2086
_MOD_DEPS="$(modinfo -k "${_KERNELVERSION}" -F depends ${_MODS} 2>"${_NO_LOG}" | sed -e 's#,# #g' | tr " " "\n" | sort -u) \
$(modinfo -k "${_KERNELVERSION}" -F softdep ${_MODS} 2>"${_NO_LOG}" | sed -e 's#.*: # #g' | tr " " "\n" | sort -u)"
_MOD_DEPS="$(modinfo -k "${_KERNELVERSION}" -F depends ${_MODS} 2>"${_NO_LOG}" | tr "," "\n" | sort -u) \
$(modinfo -k "${_KERNELVERSION}" -F softdep ${_MODS} 2>"${_NO_LOG}" | tr ".*: " "\n" | sort -u)"
_DEP_COUNT=0
# next tries, ensure to catch all modules with depends
while true; do
#shellcheck disable=SC2046,SC2086
_MOD_DEPS="$(echo ${_MOD_DEPS} \
$(modinfo -k "${_KERNELVERSION}" -F depends ${_MOD_DEPS} 2>"${_NO_LOG}" | sed -e 's#,# #g' | tr " " "\n" | sort -u) \
$(modinfo -k "${_KERNELVERSION}" -F softdep ${_MOD_DEPS} 2>"${_NO_LOG}" | sed -e 's#.*: # #g' | tr " " "\n" | sort -u) \
$(modinfo -k "${_KERNELVERSION}" -F depends ${_MOD_DEPS} 2>"${_NO_LOG}" | tr "," "\n" | sort -u) \
$(modinfo -k "${_KERNELVERSION}" -F softdep ${_MOD_DEPS} 2>"${_NO_LOG}" | tr ".*: " "\n" | sort -u) \
| tr " " "\n" | sort -u)"
_DEP_COUNT2="$(wc -w <<< "${_MOD_DEPS}")"
[[ "${_DEP_COUNT}" == "${_DEP_COUNT2}" ]] && break