From 0a29fabd3246599c3b5884440c3dfa8afac0c277 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann Date: Sat, 1 Aug 2020 15:43:13 +0200 Subject: genkernel: Move grep/zgrep check to determine_real_args() Signed-off-by: Thomas Deutschmann --- gen_determineargs.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'gen_determineargs.sh') diff --git a/gen_determineargs.sh b/gen_determineargs.sh index d145d165..d8f30286 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -279,6 +279,20 @@ determine_real_args() { gen_die "'realpath -m /' failed. We need a realpath version which supports '-m' mode!" fi + if hash grep &>/dev/null + then + GREP_CMD=grep + else + gen_die "grep not found. Is sys-apps/grep installed?" + fi + + if hash zgrep &>/dev/null + then + ZGREP_CMD=zgrep + else + print_warning 1 "zgrep not found. Is app-arch/gzip installed? You will be unable to use compressed config files!" + fi + print_info 4 "Resolving config file, command line, and arch default settings." # Dest / Config File Command Line Arch Default -- cgit v1.2.3-65-gdbad