Boost logo

Boost :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2006-12-22 15:35:21


For those who might consider helping out with changing all those
license+copyright omissions I'm attaching the shell script I use for
that task. It doesn't have much testing other than it runs in the very
basic Bourne shell of OpenBSD. So it should work on just about all Unix
variants and other like the MSYS/MinGW shell or Cygwin as long as some
usual commands are available (grep, sed, sort, read, cvs, vi). What it does:

* It looks up the history in CVS and construct a copyright statement
based on the edits.
* The names it puts in reflect those in the SF users list plus those in
the blanket permissions list.
* For people that aren't in the blanket permissions, instead of the name
it puts in "** /sf-user-name/ **" to indicate the copyright is not safe
to leave as is.
* It runs "vi" to give one a chance to clean up the edited file. People
have their favorite editors so change that as you prefer.

Enjoy. And thanks in advance for the *LC* changes :-)

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

#!/bin/sh

# Copyright 2006 Rene Rivera
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)

function lookup_author
{
        case $1 in
                #~ aaron_windsor ) echo "Aaron Windsor" ;;
                agurtovoy) echo "Aleksey Gurtovoy" ;;
                #~ alnsn) echo "Alexander Nasonov" ;;
                #~ aliazarbayejani) echo "Ali Azarbayejani" ;;
                #~ alisdairm27386) echo "Alisdair Meredith" ;;
                #~ alkise) echo "Alkis Evlogimenos" ;;
                #~ andreas_huber69) echo "Andreas Huber" ;;
                #~ diemumiee) echo "Andreas Pokorny" ;;
                #~ nimnul) echo "Andrey Melnikov" ;;
                anthony) echo "Anthony Williams" ;;
                #~ vertleyb) echo "Arkadiy Vertleyb" ;;
                beman_dawes) echo "Beman Dawes" ;;
                #~ wom-work) echo "Ben Hutchings" ;;
                #~ bjorn_karlsson) echo "Bjorn Karlsson" ;;
                #~ brett_calcott) echo "Brett Calcott" ;;
                nicoddemus) echo "Bruno da Silva de Oliveira" ;;
                #~ cepstein) echo "Caleb Epstein" ;;
                #~ cpdaniel) echo "Carl Daniel" ;;
                #~ carlos_p_coelho) echo "Carlos Pinto Coelho" ;;
                #~ cmb537) echo "cbarrron" ;;
                #~ chris_kohlhoff) echo "Chris Kohlhoff" ;;
                #~ cslittle) echo "Chris Little" ;;
                #~ cgc) echo "Christopher Currie" ;;
                #~ dan_marsden) echo "Dan Marsden" ;;
                nuffer) echo "Dan Nuffer" ;;
                #~ daniel_egloff) echo "Daniel Egloff" ;;
                dfrey42) echo "Daniel Frey" ;;
                #~ danieljames) echo "Daniel James" ;;
                #~ daniel_wallin) echo "Daniel Wallin" ;;
                dlwalker) echo "Daryle L. Walker" ;;
                david_abrahams) echo "David Abrahams" ;;
                #~ hevad57) echo "David Hawkes" ;;
                dgregor) echo "Douglas Gregor" ;;
                ebf) echo "Eric Friedman" ;;
                eric_niebler) echo "Eric Niebler" ;;
                fcacciola) echo "Fernando Cacciola" ;;
                #~ akalin) echo "Frederick Akalin" ;;
                #~ blq) echo "Fredrik Blomqvist" ;;
                gwpowell) echo "Gary Powell" ;;
                rogeeff) echo "Gennadiy Rozental" ;;
                #~ gennaro_prota) echo "Gennaro Prota" ;;
                #~ giovannibajo) echo "Giovanni Bajo" ;;
                ganssauge) echo "Gottfried Ganßauge" ;;
                #~ gmelquio) echo "Guillaume Melquiond" ;;
                hkaiser) echo "Hartmut Kaiser" ;;
                #~ hschober) echo "Hendrik Schober" ;;
                hervebronnimann) echo "Hervé Brönnimann" ;;
                #~ hubert_holin) echo "Hubert Holin" ;;
                #~ igaztanaga) echo "Ion Gaztañaga" ;;
                imaman) echo "Itay Maman" ;;
                urzuga) echo "Jaakko Järvi" ;;
                jsuter) echo "Jaap Suter" ;;
                #~ jano_gaspar) echo "Jan Gaspar" ;;
                az_sw_dude) echo "Jeff Garland" ;;
                #~ jeffflinn) echo "Jeff Flinn" ;;
                jmaurer) echo "Jens Maurer" ;;
                #~ jewillco) echo "Jeremiah Willcock" ;;
                jsiek) echo "Jeremy Siek" ;;
                #~ jerrydy) echo "Jerry Dy" ;;
                #~ dramatec) echo "Jim Douglas" ;;
                #~ biochimia) echo "João Abecasis" ;;
                #~ joaquintides) echo "Joaquin M Lopez Muñoz" ;;
                djowel) echo "Joel de Guzman" ;;
                #~ joerg_walter) echo "Joerg Walter" ;;
                #~ jdmoore99) echo "John D Moore" ;;
                johnmaddock) echo "John Maddock" ;;
                jbandela) echo "John R. Bandela" ;;
                #~ jonkalb) echo "Jon Kalb" ;;
                #~ jbrandmeyer) echo "Jonathan Brandmeyer" ;;
                turkanis) echo "Jonathan Turkanis" ;;
                #~ redi) echo "Jonathan Wakely" ;;
                #~ thejcab) echo "Juan Carlos Arevalo-Baeza" ;;
                jhunold) echo "Juergen Hunold" ;;
                kevlin) echo "Kevlin Henney" ;;
                #~ cppljevans) echo "Larry Evans" ;;
                llee1) echo "Lie-Quan Lee" ;;
                mmurrett) echo "Mac Murrett" ;;
                #~ kaalus) echo "Marcin Kalicinski" ;;
                #~ mark_rodgers) echo "Mark Rodgers" ;;
                #~ schoepflin) echo "Markus Schöpflin" ;;
                #~ mclow) echo "Marshall Clow" ;;
                #~ martin_wille) echo "Martin Wille" ;;
                #~ mathiaskoch) echo "Mathias Koch" ;;
                #~ troyer) echo "Matthias Troyer" ;;
                glassfordm) echo "Michael Glassford" ;;
                mistevens) echo "Michael Stevens" ;;
                #~ mrovner) echo "Mike Rovner" ;;
                #~ mbergal) echo "Misha Bergal" ;;
                #~ nbecker) echo "Neal D. Becker" ;;
                #~ nksauter) echo "Nicholas K. Sauter" ;;
                nmusatti) echo "Nicola Musatti" ;;
                nikiml) echo "Nikolay Mladenov" ;;
                #~ nmotgi) echo "Nitin Jeevan Motgi" ;;
                #~ noel_belcourt) echo "Noel Belcourt" ;;
                pmenso57) echo "Paul Mensonides" ;;
                #~ pvozenilek) echo "Pavel Vozenilek" ;;
                memring) echo "Pavol Droba" ;;
                #~ burbelgruff) echo "Peder Holt" ;;
                #~ pedro_ferreira) echo "Pedro Ferreira" ;;
                pdimov) echo "Peter Dimov" ;;
                #~ rwgk) echo "Ralf W. Grosse-Kunstleve" ;;
                raoulgough) echo "Raoul Gough" ;;
                #~ msclrhd) echo "Reece H Dunn" ;;
                grafik) echo "Rene Rivera" ;;
                ramey) echo "Robert Ramey" ;;
                speedsnail) echo "Roland Schwarz" ;;
                rgarcia) echo "Ronald Garcia" ;;
                samuel_k) echo "Samuel Krempp" ;;
                stefan) echo "Stefan Seefeld" ;;
                #~ slapi) echo "Stefan Slapeta" ;;
                #~ sdiederich) echo "Stephan Diederich" ;;
                shammah) echo "Stephen Cleary" ;;
                syl) echo "Sylvain Pion" ;;
                #~ tslettebo) echo "Terje Slettebo" ;;
                witt) echo "Thomas Witt" ;;
                nesotto) echo "Thorsten Jørgen Ottosen" ;;
                #~ t_schwinger) echo "Tobias Schwinger" ;;
                #~ reportbase) echo "Tom Brinkman" ;;
                #~ reportbase2004) echo "Tom Brinkman" ;;
                tknapen) echo "Toon Knapen" ;;
                #~ straszheim) echo "Troy D. Straszheim" ;;
                #~ vawjr) echo "Victor A. Wagner Jr." ;;
                vladimir_prus) echo "Vladimir Prus" ;;
                bill_kempf) echo "William E. Kempf" ;;

                *) echo "** $1 **" ;;
        esac
}

function echo_copyright
{
        read current_author current_year
        while read author year; do
                if test "${current_author}" = "${author}" ; then
                        current_year="${current_year}, ${year}"
                else
                        echo "$comment0 Copyright ${current_year} `lookup_author ${current_author}` $comment1"
                        current_year=${year}
                        current_author=${author}
                fi
        done
        echo "$comment0 Copyright ${current_year} `lookup_author ${current_author}` $comment1"
        echo "$comment0 Distributed under the Boost Software License, Version 1.0. $comment1"
        echo "$comment0 (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) $comment1"
}

function echo_lc
{
        cvs log -bN $1 2>/dev/null \
        | grep '^date:' \
        | sed \
                -e 's/^date:.//' \
                -e 's/[/][^;]*[^:]*.//' \
                -e 's/[;].*//' \
                -e 's/^\(....\).\(.*\)/\2 \1/' \
        | sort -u \
        | echo_copyright
}

function echo_file
{
        echo_lc $1
        echo
        cvs update -p -r HEAD $1
}

case $1 in
        *.py|*.jam|Jamfile*|*.sh|*.pl)
        comment0="#"
        comment1=""
        ;;

        *.css|*.cpp|*.hpp|*.h)
        comment0="/*"
        comment1="*/"
        ;;

        *.html|*.xml|*.xsl)
        comment0="<!--"
        comment1="-->"
        ;;
esac

echo_file $1 > $1.lc
mv -f $1 $1.bak
mv -f $1.lc $1
vi $1
echo ====
head $1
echo ====


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk