ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs JavaTest.java ManifestTest.java
Date Thu, 14 Feb 2002 09:24:48 GMT
On 14 Feb 2002, <bodewig@apache.org> wrote:
>   I took the time to write a simple shell script to audit Copyright
>   lines

For those who are interested: The script expects to be named 2002 (or
invoked as a symlink of that name), this is a preparation for 2003.
Nothing fancy, suggestions that improve the script are welcome.

The script performs a cvs update and lists all files that have changed
and either have no copyright line or no year 2002 in the copyright
line.

-----------------------------------------------------------------------
#!/bin/sh

TEMP_FILE=/tmp/changed-files
YEAR=`basename $0`

CVS_RSH=ssh; export CVS_RSH
cvs -z3 update -dP | fgrep -v proposal | cut -f 2 -d ' ' > $TEMP_FILE

echo "Changed:"
echo "========"
cat $TEMP_FILE
echo

xargs fgrep -L Copyright < $TEMP_FILE > /tmp/no-copyright

echo "No Copyright line"
echo "================="
cat /tmp/no-copyright
echo

xargs fgrep -H Copyright < $TEMP_FILE | fgrep -v $YEAR | cut -f 1 -d : > /tmp/no-$YEAR

echo "No Copyright line for year $YEAR"
echo "================================"
cat /tmp/no-$YEAR

rm $TEMP_FILE
-----------------------------------------------------------------------

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message