# HG changeset patch # User Sebastien Decugis # Date 1271405043 -32400 # Node ID d52832097f42068d37a2be6aa47c5a7040b6fb2c # Parent 042af0000c0a4499306f8e7255703cf0b4fff930 Ported the script to freeDiameter diff -r 042af0000c0a -r d52832097f42 doc/update_copyright.sh --- a/doc/update_copyright.sh Fri Apr 16 16:57:39 2010 +0900 +++ b/doc/update_copyright.sh Fri Apr 16 17:04:03 2010 +0900 @@ -1,19 +1,19 @@ #!/bin/bash -x -# This script will search all waaad copyrights from source files, and update these if -# the waaad source was modified later. +# This script will search all copyrights dates from source files, and update these if +# the file has been modified at a later date. -if [ ! -f waaad/waaad-internal.h ]; -then echo "This script must be run from waaad top directory" +if [ ! -f include/freeDiameter/freeDiameter.h ]; +then echo "This script must be run from the source top directory" exit 1; fi; # Create a clean working copy TMPDIR=`mktemp -d up_cop.XXXXXXX` || exit 1 -hg clone . $TMPDIR/waaad || exit 1 -pushd $TMPDIR/waaad +hg clone . $TMPDIR/fD || exit 1 +pushd $TMPDIR/fD -# Now, for each file +# Now, for each file with a copyright for SRC_FILE in `find . -name .hg -prune -or -type f -exec grep -q 'Copyright (c) 20.., WIDE Project and NICT' {} \; -print`; do HG_YEAR=`hg log --template '{date|shortdate}' $SRC_FILE | tr - ' ' | awk '{print \$1}'`