util/lint: fall back to regular grep in kconfig_lint
Automatically fall back to using regular grep if working outside a git repository and the option to use regular grep is not specified Signed-off-by: Solomon Alan-Dei <alandei.solomon@gmail.com> Change-Id: I0cdecf01a0e74c30947c4fe7e7c7d9457a5165a1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66637 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
This commit is contained in:
parent
7c09e546af
commit
a6e60f043b
|
@ -58,7 +58,12 @@ Main();
|
|||
#-------------------------------------------------------------------------------
|
||||
sub Main {
|
||||
|
||||
check_arguments();
|
||||
check_arguments();
|
||||
if ( !($dont_use_git_grep || `git rev-parse --is-inside-work-tree`) ) {
|
||||
$dont_use_git_grep = 1;
|
||||
print STDERR "\nGit grep unavailable, falling back to regular grep...\n";
|
||||
}
|
||||
|
||||
open( STDOUT, "> $output_file" ) or die "Can't open $output_file for output: $!\n";
|
||||
|
||||
if ( defined $top_dir ) {
|
||||
|
|
Loading…
Reference in New Issue