Commit 160b56df authored by Florent D'Halluin's avatar Florent D'Halluin
Browse files

Update CBS.

Version 40405a129b6abfe96b5b90de2c392500b048ef72.

See cbs/Changelog.
parent dc4c5d02
2009-09-30 d-halluin <d-halluin@lrde.epita.fr>
Update CBS.
Version 40405a129b6abfe96b5b90de2c392500b048ef72.
See cbs/Changelog.
2009-09-21 d-halluin <d-halluin@lrde.epita.fr>
 
Distribute CSB under GPL in Vaucanson.
......
2009-09-28 d-halluin <d-halluin@lrde.epita.fr>
Add scripts to change licence from WTFPL to GPL.
Rewrite headers.
Get COPYING from parent directory.
* README:
Describe the available licenses.
* configure.ac:
Add # in header so that it is properly recognized.
* reheader-cpp.sed,
* reheader-sh.sed,
* reheader-text.sed,
* reheader.sh:
New. Scripts for changing license.
2009-09-07 d-halluin <d-halluin@lrde.epita.fr>
Fix make dist.
......
2,16c\
//\
// CBS, a C++ benchmarking suite.\
//\
// Copyright (C) 2007, 2008, 2009 The CBS authors.\
//\
// 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\
// of the License, or (at your option) any later version.\
//\
// The complete GNU General Public Licence Notice can be found as the\
// `COPYING' file in the root directory.\
//\
// The CBS Authors consists of people listed in the `AUTHORS' file.\
//\
1,12c\
## CBS, a C++ benchmarking suite.\
##\
## Copyright (C) 2007, 2008, 2009 The CBS authors.\
##\
## 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\
## of the License, or (at your option) any later version.\
##\
## The complete GNU General Public Licence Notice can be found as the\
## `COPYING' file in the root directory.\
##\
## The CBS Authors consists of people listed in the `AUTHORS' file.
1,12c\
CBS, a C++ benchmarking suite.\
\
Copyright (C) 2007, 2008, 2009 The CBS authors.\
\
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\
of the License, or (at your option) any later version.\
\
The complete GNU General Public Licence Notice can be found as the\
`COPYING' file in the root directory.\
\
The CBS Authors consists of people listed in the `AUTHORS' file.
#!/bin/sh
echo "This script replaces WTFPL v2 headers with GPL v2 headers"
echo "in all CBS files and copies the licence text from the parent"
echo "directory."
echo ""
echo "It is meant to be used from an active Vaucanson repository,"
echo "in the cbs/ directory."
echo "It should work elsewhere, but make backups first."
echo ""
echo "MAKE SURE THE SCRIPT IS STARTED FROM THE CBS ROOT DIR!"
echo ""
echo "Press Enter to continue or Ctrl-C to abort."
read unused
echo ""
echo "Looking for files:"
files=`find . | grep -vE "__backup_$" | grep -vE ".git" | grep -vE "_build"`
rename_cpp()
{
echo "C++ file"
res=`cat $file | grep -n -m 16 "// The complete WTFPL license"`
if [ ! "x$res" = "x" ]; then
echo "WTFPL header found"
if [ `expr substr "$res" 1 3` = "11:" ]; then
echo "Header in proper location"
echo "Rewriting header..."
sed -i -f reheader-cpp.sed $file
else
echo "Header not recognized"
echo "Not rewriting"
fi
else
echo "WTFPL header not found"
echo "Not rewriting"
fi
}
rename_sh()
{
echo "Script file"
res=`cat $file | grep -n -m 16 "## The complete WTFPL license"`
if [ ! "x$res" = "x" ]; then
echo "WTFPL header found"
if [ `expr substr "$res" 1 2` = "9:" ]; then
echo "Header in proper location"
echo "Rewriting header..."
sed -i -f reheader-sh.sed $file
else
echo "Header not recognized"
echo "Not rewriting"
fi
else
echo "WTFPL header not found"
echo "Not rewriting"
fi
}
rename_text()
{
echo "Text file"
res=`cat $file | grep -n -m 16 "The complete WTFPL license"`
if [ ! "x$res" = "x" ]; then
echo "WTFPL header found"
if [ `expr substr "$res" 1 2` = "9:" ]; then
echo "Header in proper location"
echo "Rewriting header..."
sed -i -f reheader-text.sed $file
else
echo "Header not recognized"
echo "Not rewriting"
fi
else
echo "WTFPL header not found"
echo "Not rewriting"
fi
}
for file in $files; do
if test -f $file; then
echo $file
case $file in
*.hh)
rename_cpp;
;;
*.hxx)
rename_cpp;
;;
*.cc)
rename_cpp;
;;
*.am)
rename_sh;
;;
*.ac)
rename_sh;
;;
*.mk)
rename_sh;
;;
*README*)
rename_text;
;;
*)
echo "Other file."
res=`grep -n "The complete WTFPL" $file`
if [ ! "x$res" = "x" ]; then
echo "Reference to WTFPL header found:"
echo "$res"
else
echo "No reference to WTFPL header found."
fi
echo "Not rewriting.";
;;
esac
fi
done
if [ -e "../COPYING" ]; then
echo "COPYING found in the parent directory."
echo "Replacing COPYING."
cp "../COPYING" .
else
echo "COPYING not found in the parent directory."
echo "Not copied."
fi
echo ""
echo "Rewriting complete."
echo ""
echo "Remaining references to WTFPL:"
echo ""
for file in $files; do
grep -nH "WTFPL" $file
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment