[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Savannah-hackers-public] using grep to scan projects
From: |
Nicodemo Alvaro |
Subject: |
[Savannah-hackers-public] using grep to scan projects |
Date: |
Sat, 16 May 2009 21:47:54 -0400 |
Hi, I've been looking into using grep as a tool to scan projects that
might not meet the hosting requirements of Savannah.
The query that I have tried using is:
grep -r -L -f license_notice --exclude-from=exclude_files $dir > no_notice
The above command will recursively scan the directory (-r), list the
paths that do not match (-L), use lines from the example notice as
reference (-f), and exclude the files that contain the similar file
name listed. Hopefully it will capture some non-compliant files, if
there are any.
The example notice is used to see if there is a line matched in the
the other files. To do that you should remove the white space at the
beginning of the line and any white space lines if possible.
The excluded files list could have something like *foo to not look at
any files that end with foo. List each of those items on their own
line unquoted.
I was wondering if there has been any advance in using tools to make
the process a little easier. Maybe, for the Blender project which has
7000+ files, I am distracting myself.
Hope that helps.
--
Nicodemo
- [Savannah-hackers-public] using grep to scan projects,
Nicodemo Alvaro <=