From c65b2a38d8d838579920aed08de619cc3e8229b5 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Fri, 14 Dec 2007 02:53:15 +0000 Subject: [PATCH] Added copyright notice. Added script (add-copyright.sh) to make doing this relatively painless. --- .../Environment/Scenes/SimStatsReporter.cs | 28 +++++++ add-copyright.sh | 73 +++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100755 add-copyright.sh diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs index 15df619b6c..d82c09b716 100644 --- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs @@ -1,3 +1,31 @@ +/* +* Copyright (c) Contributors, http://opensimulator.org/ +* See CONTRIBUTORS.TXT for a full list of copyright holders. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the OpenSim Project nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ + using System; using System.Collections.Generic; using System.Text; diff --git a/add-copyright.sh b/add-copyright.sh new file mode 100755 index 0000000000..ce5072a277 --- /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}