commit:     9db8c8c0e64be497bc579122e3344b0fee7dc302
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 20 23:51:00 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Nov 24 19:59:16 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=9db8c8c0

genkernel: Check for [z]grep

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 genkernel | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/genkernel b/genkernel
index 88dba56..7cf8f15 100755
--- a/genkernel
+++ b/genkernel
@@ -106,6 +106,16 @@ print_info 1 "Using genkernel configuration from 
'${_GENKERNEL_CONF}' ..."
 unset _GENKERNEL_CONF
 print_info 1 "Running with options: ${GK_OPTIONS}"
 
+if ! hash grep &>/dev/null
+then
+       gen_die "grep not found. Is sys-apps/grep installed?"
+fi
+
+if ! hash zgrep &>/dev/null
+then
+       print_warning 1 "zgrep not found. Is app-arch/gzip installed? You will 
be unable to use compressed config files!"
+fi
+
 # Save any customizations of MODULES_* first.
 override_module_vars="$(compgen -A variable |grep '^MODULES_')"
 for v in ${override_module_vars}

Reply via email to