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

Unified 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, 3 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/tools/find_files.pl
diff --git a/android_webview/tools/find_files.pl b/android_webview/tools/find_files.pl
new file mode 100755
index 0000000000000000000000000000000000000000..5ad414a20a36224dd4b95bffef01a30b54415dbf
--- /dev/null
+++ b/android_webview/tools/find_files.pl
@@ -0,0 +1,32 @@
+#!/usr/bin/perl -w
+# 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
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Use: find_files.pl <start-from> [exclude-dir ...]
+
+use strict;
+use warnings;
+use File::Basename;
+
+my $progname = basename($0);
+
+my $root_dir = shift @ARGV;
+my @find_args = ();
+while (@ARGV) {
+ my $path = shift @ARGV;
+ push @find_args, qw'-not ( -path', "*/$path/*", qw'-prune )'
+}
+push @find_args, qw(-follow -type f -print);
+
+open FIND, '-|', 'find', $root_dir, @find_args
+ or die "$progname: Couldn't exec find: $!\n";
+my $check_regex = '\.(asm|c(c|pp|xx)?|h(h|pp|xx)?|p(l|m)|xs|sh|php|py(|x)' .
+ '|rb|idl|java|el|sc(i|e)|cs|pas|inc|js|pac|html|dtd|xsl|mod|mm?' .
+ '|tex|mli?)$';
+my @files = ();
+while (<FIND>) {
+ chomp;
+ print "$_\n" unless (-z $_ || !m%$check_regex%);
+}
+close FIND;
« 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