From c65b2a38d8d838579920aed08de619cc3e8229b5 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Fri, 14 Dec 2007 02:53:15 +0000 Subject: Added copyright notice. Added script (add-copyright.sh) to make doing this relatively painless. --- add-copyright.sh | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100755 add-copyright.sh (limited to 'add-copyright.sh') diff --git a/add-copyright.sh b/add-copyright.sh new file mode 100755 index 0000000..ce5072a --- /dev/null +++ b/add-copyright.sh @@ -0,0 +1,73 @@ +#!/bin/sh + +TEMPNAME="copyright_script_temp_file" +COPYNAME="copyright_script_copyright_notice" + +URL="http://opensimulator.org/" +PROJNAME="OpenSim" + +cat > ${COPYNAME} < ${TEMPNAME} + grep -q Copyright ${TEMPNAME} + if [ $? == 1 ]; then + BOMSTATUS=`has_bom $f` + rm ${TEMPNAME} + + if [ ${BOMSTATUS} == 1 ]; then + echo -ne \\0357\\0273\\0277 > ${TEMPNAME} + fi + + cat ${COPYNAME} >> ${TEMPNAME} + + if [ ${BOMSTATUS} == 1 ]; then + cat $f | perl -p -e "s/^\\xEF\\xBB\\xBF//" >> ${TEMPNAME} + else + cat $f >> ${TEMPNAME} + fi + + mv ${TEMPNAME} $f + fi +done + +rm -f ${COPYNAME} ${TEMPNAME} -- cgit v1.1