forked from alx-tools/Betty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Error when no file detected recursively
- Loading branch information
Alexandre Gautier
committed
Aug 29, 2017
1 parent
680c0cc
commit ed912c7
Showing
2 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,7 @@ | |
# -- Dan Luedtke <[email protected]> | ||
|
||
my $V = '1.0'; | ||
my $P = $0; | ||
|
||
sub printVersion { | ||
|
||
|
@@ -3151,6 +3152,11 @@ ($) | |
my @files_to_process = @ARGV; | ||
if ($recursive == 1) { | ||
@files_to_process = split(/\n/, `find . -name "*.c" -o -name "*.h"`); | ||
if (scalar @files_to_process == 0) { | ||
my $exec_name = basename($P); | ||
print "$exec_name: no input files\n"; | ||
exit(1); | ||
} | ||
} | ||
|
||
foreach (@files_to_process) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters