- Use Bash tests (i.e. [[ ]] instead of [ ])
- Use consistent newlines for if/while
- Drop unnecessary ; line terminators
- Add a handful of missing || dies
Signed-off-by: Sam James <
sam@gentoo.org>
---
eclass/linux-mod.eclass | 149 +++++++++++++++++-----------------------
1 file changed, 64 insertions(+), 85 deletions(-)
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index ff2294f1e4ef..b0a1264288a0 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -199,13 +199,13 @@ DEPEND="${RDEPEND}
use_m() {
debug-print-function ${FUNCNAME} $*
- # if we haven't determined the version yet, we need too.
- get_version;
+ # If we haven't determined the version yet, we need to.
+ get_version
- # if the kernel version is greater than 2.6.6 then we should use
+ # If the kernel version is greater than 2.6.6 then we should use
# M= instead of SUBDIRS=
- [ ${KV_MAJOR} -ge 3 ] && return 0
- [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -gt 5 -a ${KV_PATCH} -gt 5 ] && \
+ [[ ${KV_MAJOR} -ge 3 ]] && return 0
+ [[ ${KV_MAJOR} -eq 2 && ${KV_MINOR} -gt 5 && ${KV_PATCH} -gt 5 ]] && \
return 0 || return 1
}
@@ -216,10 +216,10 @@ use_m() {
convert_to_m() {
debug-p