Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: android_webview/tools/find_files.pl

Issue 589143002: [Android WebView] Run license scanning in parallel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « android_webview/tools/find_copyrights.pl ('k') | android_webview/tools/webview_licenses.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/perl -w
2 # Copyright 2013 The Chromium Authors. All rights reserved.
mkosiba (inactive) 2014/09/23 15:53:52 2014?
mnaganov (inactive) 2014/09/23 16:13:03 I will be removing both of the files soon (definit
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 # Use: find_files.pl <start-from> [exclude-dir ...]
7
8 use strict;
9 use warnings;
10 use File::Basename;
11
12 my $progname = basename($0);
13
14 my $root_dir = shift @ARGV;
15 my @find_args = ();
16 while (@ARGV) {
17 my $path = shift @ARGV;
18 push @find_args, qw'-not ( -path', "*/$path/*", qw'-prune )'
19 }
20 push @find_args, qw(-follow -type f -print);
21
22 open FIND, '-|', 'find', $root_dir, @find_args
23 or die "$progname: Couldn't exec find: $!\n";
24 my $check_regex = '\.(asm|c(c|pp|xx)?|h(h|pp|xx)?|p(l|m)|xs|sh|php|py(|x)' .
25 '|rb|idl|java|el|sc(i|e)|cs|pas|inc|js|pac|html|dtd|xsl|mod|mm?' .
26 '|tex|mli?)$';
27 my @files = ();
28 while (<FIND>) {
29 chomp;
30 print "$_\n" unless (-z $_ || !m%$check_regex%);
31 }
32 close FIND;
OLDNEW
« no previous file with comments | « android_webview/tools/find_copyrights.pl ('k') | android_webview/tools/webview_licenses.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698