diff options
author | 2019-07-12 22:55:23 +0200 | |
---|---|---|
committer | 2019-07-14 11:29:08 +0200 | |
commit | 93e73794f18ebfe8ec083981adddda289d75005d (patch) | |
tree | c680bc948924a127746396e51288a790bbb569b8 /gen_moddeps.sh | |
parent | gen_dep_list(): Refactored (diff) | |
download | genkernel-93e73794f18ebfe8ec083981adddda289d75005d.tar.gz genkernel-93e73794f18ebfe8ec083981adddda289d75005d.tar.bz2 genkernel-93e73794f18ebfe8ec083981adddda289d75005d.zip |
gen_deps(): Refactored
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gen_moddeps.sh')
-rwxr-xr-x | gen_moddeps.sh | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/gen_moddeps.sh b/gen_moddeps.sh index 886f045f..7e674e7c 100755 --- a/gen_moddeps.sh +++ b/gen_moddeps.sh @@ -22,6 +22,30 @@ gen_dep_list() { fi } +gen_deps() { + local modlist + local deps + + local x + for x in ${*} + do + echo ${x} >> "${TEMP}/moddeps" + modlist=`modules_dep_list ${x}` + if [ "${modlist}" != "" -a "${modlist}" != " " ] + then + deps=$(strip_mod_paths ${modlist}) + else + deps="" + fi + + local y + for y in ${deps} + do + echo ${y} >> "${TEMP}/moddeps" + done + done +} + modules_kext() { KEXT=".ko" @@ -54,26 +78,3 @@ strip_mod_paths() done echo "${myret}" } - - -gen_deps() -{ - local modlist - local deps - - for x in ${*} - do - echo ${x} >> ${TEMP}/moddeps - modlist=`modules_dep_list ${x}` - if [ "${modlist}" != "" -a "${modlist}" != " " ] - then - deps=`strip_mod_paths ${modlist}` - else - deps="" - fi - for y in ${deps} - do - echo ${y} >> ${TEMP}/moddeps - done - done -} |