diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-03-08 17:02:43 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-07-09 18:54:45 +0200 |
commit | 0480976bc6397ce0c807f5a7e9603a65990d0042 (patch) | |
tree | a05408f6729cc891cbad6be40ca41afb5fda71fa /eclass/linux-info.eclass | |
parent | linux-info.eclass: get_localversion, do not call 'ls' (diff) | |
download | gentoo-0480976bc6397ce0c807f5a7e9603a65990d0042.tar.gz gentoo-0480976bc6397ce0c807f5a7e9603a65990d0042.tar.bz2 gentoo-0480976bc6397ce0c807f5a7e9603a65990d0042.zip |
linux-info.eclass: Replace unnecessary $? checks
Diffstat (limited to 'eclass/linux-info.eclass')
-rw-r--r-- | eclass/linux-info.eclass | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index 0eca55725874..d5eb0e73fcfa 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -628,8 +628,7 @@ get_running_version() { # This attempts to find the version of the sources, and otherwise falls back to # the version of the running kernel. linux-info_get_any_version() { - get_version - if [[ $? -ne 0 ]]; then + if ! get_version; then ewarn "Unable to calculate Linux Kernel version for build, attempting to use running version" get_running_version fi @@ -848,13 +847,11 @@ check_zlibinflate() { ebegin "checking ZLIB_INFLATE" linux_chkconfig_builtin CONFIG_ZLIB_INFLATE - eend $? - [ "$?" != 0 ] && die + eend $? || die ebegin "checking ZLIB_DEFLATE" linux_chkconfig_builtin CONFIG_ZLIB_DEFLATE - eend $? - [ "$?" != 0 ] && die + eend $? || die local LINENO_START local LINENO_END |