1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
#!/bin/sh
# BZFlag
# Copyright (c) 1993 - 2005 Tim Riker
OLDCOPYRIGHTTEXT='Copyright (c) 1993 - 2005'
# NOTE: update just this line and then run the script
NEWCOPYRIGHTTEXT='Copyright (c) 1993 - 2005'
#
# update copyright in all files
#
# bzflag top-level dir
for root in . .. ; do
if [ -r $root/bzflag.lsm.in ] ; then
break
fi
done
if [ -r $root/include/config.h ] ; then
echo "$0 should be run only after a make maintianer-clean!"
exit 1
fi
myname=touchcopyright
tmpfile=$root/$myname.tmp
rm -f $tmpfile
# touch myself last
files="`find $root -type f | grep -v 'png$' | grep -v misc/$myname` misc/$myname"
# do replacement
for file in $files; do
echo -e -n "$file\r"
if [ ! -w ${file} ]; then
echo "${file} not found or not writable."
continue
fi
# cat to the file, not move to preserve permissions
if sed -e "s/${OLDCOPYRIGHTTEXT}/${NEWCOPYRIGHTTEXT}/" < ${file} > $tmpfile ; then
cat $tmpfile > ${file}
fi
done
rm -f $tmpfile
# Local Variables: ***
# mode:sh ***
# tab-width: 8 ***
# sh-indentation: 2 ***
# sh-basic-offset: 2 ***
# indent-tabs-mode: t ***
# End: ***
# ex: shiftwidth=2 tabstop=8
|