#!/bin/bash
#
# Check the files that are being committed for a copyright with a proper year
#
year=`date +%Y`
for file in `git diff-index --name-only HEAD` ; do
    echo "--checking copyright year: $file"
    grep $year $file >> /dev/null
    if [ $? -ne 0 ] ; then
        echo "Warning: $file seems to be missing a copyright string with the year $year in it.";
    fi
done
exit 0
