diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2019-07-12 22:58:48 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2019-07-14 11:29:09 +0200 |
commit | f7b2c3f024da36cb1e11aba25d1a6bb3195dff9a (patch) | |
tree | 37543b2906b251d4b8d71090e44a7ac7c6b9b123 /gen_moddeps.sh | |
parent | modules_dep_list(): Moved (diff) | |
download | genkernel-f7b2c3f024da36cb1e11aba25d1a6bb3195dff9a.tar.gz genkernel-f7b2c3f024da36cb1e11aba25d1a6bb3195dff9a.tar.bz2 genkernel-f7b2c3f024da36cb1e11aba25d1a6bb3195dff9a.zip |
modules_kext(): Refactored
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gen_moddeps.sh')
-rwxr-xr-x | gen_moddeps.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gen_moddeps.sh b/gen_moddeps.sh index 918fc38..869788d 100755 --- a/gen_moddeps.sh +++ b/gen_moddeps.sh @@ -54,13 +54,15 @@ modules_dep_list() { fi } -modules_kext() -{ - KEXT=".ko" - if grep -sq '^CONFIG_MODULE_COMPRESS=y' "${KERNEL_OUTPUTDIR}"/.config; then +modules_kext() { + local KEXT='.ko' + + if grep -sq '^CONFIG_MODULE_COMPRESS=y' "${KERNEL_OUTPUTDIR}"/.config + then grep -sq '^CONFIG_MODULE_COMPRESS_XZ=y' "${KERNEL_OUTPUTDIR}"/.config && KEXT='.ko.xz' grep -sq '^CONFIG_MODULE_COMPRESS_GZIP=y' "${KERNEL_OUTPUTDIR}"/.config && KEXT='.ko.gz' fi + echo ${KEXT} } |