#!/bin/bash
# $Id: lyskomd-copyrights,v 1.11 2002/03/29 22:27:17 ceder Exp $
# Copyright (C) 1995-1996, 1999  Lysator Academic Computer Association.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Please mail bug reports to bug-lyskom@lysator.liu.se.

if [ ! -f src/server/fncdef.txt ]; then
    echo $0: must be invoked from base of lyskomd source >&2; exit 1
fi
if [ ! -f scripts/CVS/Entries ]; then
    echo $0: must be invoked in a CVS working copy of the sources >&2; exit 1
fi
find . \( -type f -print \) -o \( -name CVS -prune \) \
	| sed \
		-e '/#/d' \
		-e '/\.bb$/d' \
		-e '/\.bbg$/d' \
		-e '/\.da$/d' \
		-e '/\.deps\//d' \
		-e '/\.elc$/d' \
		-e '/\.log$/d' \
		-e '/\.o$/d' \
		-e '/\.orig$/d' \
		-e '/\.rej$/d' \
		-e '/\.sum$/d' \
		-e '/\.tar\.gz$/d' \
		-e '/\.tmp$/d' \
		-e '/\/.cvsignore$/d' \
		-e '/\/ChangeLog/d' \
		-e '/\/Makefile$/d' \
		-e '/\/Makefile.in$/d' \
		-e '/\/README$/d' \
		-e '/\/README\.FSF$/d' \
		-e '/\/TAGS$/d' \
		-e '/\/\.gdbinit$/d' \
		-e '/\/\site.exp/d' \
		-e '/\/autom4te.cache\//d' \
		-e '/\/lib[^/]*\.a$/d' \
		-e '/^\.\/AUTHORS$/d' \
		-e '/^\.\/COPYING$/d' \
		-e '/^\.\/HACKING$/d' \
		-e '/^\.\/NEWS$/d' \
		-e '/^\.\/TODO$/d' \
		-e '/^\.\/aclocal\.m4/d' \
		-e '/^\.\/config.h$/d' \
		-e '/^\.\/config\.cache$/d' \
		-e '/^\.\/config\.h\.in/d' \
		-e '/^\.\/config\.log$/d' \
		-e '/^\.\/config\.status$/d' \
		-e '/^\.\/configure$/d' \
		-e '/^\.\/db-crypt\//d' \
		-e '/^\.\/db-nocrypt\//d' \
		-e '/^\.\/doc\/.*\.am$/d' \
		-e '/^\.\/doc\/.*\.aux$/d' \
		-e '/^\.\/doc\/.*\.cp$/d' \
		-e '/^\.\/doc\/.*\.dvi$/d' \
		-e '/^\.\/doc\/.*\.fn$/d' \
		-e '/^\.\/doc\/.*\.fns$/d' \
		-e '/^\.\/doc\/.*\.info$/d' \
		-e '/^\.\/doc\/.*\.info-[0-9]$/d' \
		-e '/^\.\/doc\/.*\.info-[0-9][0-9]$/d' \
		-e '/^\.\/doc\/.*\.ky$/d' \
		-e '/^\.\/doc\/.*\.pdf$/d' \
		-e '/^\.\/doc\/.*\.pg$/d' \
		-e '/^\.\/doc\/.*\.toc$/d' \
		-e '/^\.\/doc\/.*\.tp$/d' \
		-e '/^\.\/doc\/.*\.tps$/d' \
		-e '/^\.\/doc\/.*\.vr$/d' \
		-e '/^\.\/doc\/IDEAS$/d' \
		-e '/^\.\/doc\/cmsltt12\.mf$/d' \
		-e '/^\.\/doc\/constructs\.expected$/d' \
		-e '/^\.\/doc\/help\.swe$/d' \
		-e '/^\.\/doc\/protocol-a\.html$/d' \
		-e '/^\.\/doc\/protocol-a\.texi$/d' \
		-e '/^\.\/doc\/protocol-a\.xml$/d' \
		-e '/^\.\/doc\/protocol-a\//d' \
		-e '/^\.\/doc\/stamp-vti$/d' \
		-e '/^\.\/doc\/version.texi$/d' \
		-e '/^\.\/run-support\/config$/d' \
		-e '/^\.\/run-support\/savecore$/d' \
		-e '/^\.\/scripts\/install-sh/d' \
		-e '/^\.\/scripts\/lyskomd-copyrights$/d' \
		-e '/^\.\/scripts\/mkinstalldirs$/d' \
		-e '/^\.\/scripts\/update-copyright$/d' \
		-e '/^\.\/src\/libraries\/libisc-new\//d' \
		-e '/^\.\/src\/libraries\/regex\//d' \
		-e '/^\.\/src\/server\/.*\.gdb$/d' \
		-e '/^\.\/src\/server\/Magics$/d' \
		-e '/^\.\/src\/server\/aux-item-def-parse\.[hc]$/d' \
		-e '/^\.\/src\/server\/aux-item-def-scan\.c$/d' \
		-e '/^\.\/src\/server\/cache-database\.c$/d' \
		-e '/^\.\/src\/server\/cache-database\.h$/d' \
		-e '/^\.\/src\/server\/call-switch\.incl$/d' \
		-e '/^\.\/src\/server\/com\.h$/d' \
		-e '/^\.\/src\/server\/dbck$/d' \
		-e '/^\.\/src\/server\/fnc-def-init\.incl$/d' \
		-e '/^\.\/src\/server\/fncdef-no-str-limit\.txt$/d' \
		-e '/^\.\/src\/server\/komrunning$/d' \
		-e '/^\.\/src\/server\/lyskomd$/d' \
		-e '/^\.\/src\/server\/prot-a-is-legal-fnc\.incl$/d' \
		-e '/^\.\/src\/server\/prot-a-parse-arg\.c$/d' \
		-e '/^\.\/src\/server\/prot-a-parse-arg\.h$/d' \
		-e '/^\.\/src\/server\/splitkomdb$/d' \
		-e '/^\.\/src\/server\/testsuite\/config\/lyskomd-config$/d' \
		-e '/^\.\/src\/server\/testsuite\/db\//d' \
		-e '/^\.\/src\/server\/testsuite\/etc\//d' \
		-e '/^\.\/src\/server\/testsuite\/test-l2g$/d' \
		-e '/^\.\/src\/server\/testsuite\/usage\.all/d' \
		-e '/^\.\/src\/server\/updateLysKOM$/d' \
		-e '/^\.\/src\/server\/version-info\.c$/d' \
		-e '/^\.\/src\/server\/version\.incl$/d' \
		-e '/^\.\/stamp-depend$/d' \
		-e '/^\.\/stamp-h$/d' \
		-e '/^\.\/stamp-h\.in/d' \
		-e '/~$/d' \
	| scripts/update-copyright
