source: trunk/bin/check_copyright.sh @ 3859

Last change on this file since 3859 was 3859, checked in by bradbell, 3 years ago

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: b20ce87227484f883f98510781da6823d164a85a
end hash code: 0b916203422e362a7c090b57b1866ee6fd733758

commit 0b916203422e362a7c090b57b1866ee6fd733758
Author: Brad Bell <bradbell@…>
Date: Sun Jan 1 03:32:08 2017 -0700

  1. The swig directory has been moved to the following separate project:

https://github.com/bradbell/cppad_swig

  1. advance to cppad-20170101.

commit 3e4d40f697a3ade82679b3fc46b31bbd15db74e0
Author: Brad Bell <bradbell@…>
Date: Fri Dec 30 19:16:22 2016 -0700

  1. Remve check_swig files (not that all its tests have been extracted).
  2. Fix perl extensions for packages (pl -> pm). check_all.pl.in: change so runns all *.pm tests in swig/perl.

commit 0a1fee2c0b565b4a3adbefd653258e5f16a783d4
Author: Brad Bell <bradbell@…>
Date: Fri Dec 30 18:28:56 2016 -0700

Extract a_fun_xam from check_swig.

commit 1e2553377b7c1c716cf83492b19d2b293c1a3427
Author: Brad Bell <bradbell@…>
Date: Fri Dec 30 10:34:15 2016 -0700

Extract vector_ad_xam from check_swig.

commit 982f7c1e74c2ffbec74090d59bb48afedb3eca3f
Author: Brad Bell <bradbell@…>
Date: Fri Dec 30 10:23:43 2016 -0700

Extract a_double_xam from check_swig.

commit af737f59961cb5c6333aec2d299102f97905dbfa
Author: Brad Bell <bradbell@…>
Date: Fri Dec 30 10:04:32 2016 -0700

make member_fun_0_ a sepeate function (instead of emtpy argument case).

commit fb077ba876fedd04a8c0468fbcb3cd984b1b60ad
Author: Brad Bell <bradbell@…>
Date: Fri Dec 30 09:42:11 2016 -0700

Change generate_output_file_ -> header_.
Move overall comment above function definition.

commit 90545651b3e2c2454fed33df8b9deb5844b8bb26
Author: Brad Bell <bradbell@…>
Date: Fri Dec 30 09:20:13 2016 -0700

Advance to cppad-20161230.

commit fa1282080a95d88c8aad7f55429bed9db7cb2873
Author: Brad Bell <bradbell@…>
Date: Fri Dec 30 09:10:48 2016 -0700

  1. Extract xam/vector_double_xam.mr from check_swig.
  2. Make some corrections to the m4 language macros.

commit 9280ed7b264ec244f4619833ba076d26f7411445
Author: Brad Bell <bradbell@…>
Date: Fri Dec 30 07:07:49 2016 -0700

Use m4 to construct octave, perl, python example from a single source
(under construction).

commit 5a7db64fa6e0117ae0b54509ee6f552a3b7c2f63
Author: Brad Bell <bradbell@…>
Date: Thu Dec 29 18:55:57 2016 -0700

CMakeLists.txt: add to comments about suppressed warnings.
CMakeLists.txt: ignore warnings for *= and /=.

commit c391a262b8dd2144b7125ac55374446c73d70160
Author: Brad Bell <bradbell@…>
Date: Thu Dec 29 18:13:40 2016 -0700

Add perl to (octave, python) as one of the languages that will be supported.

commit 8248387afa2ad45342409bcd88e4ff5ba489e367
Author: Brad Bell <bradbell@…>
Date: Thu Dec 29 05:50:56 2016 -0700

Remove some svn $Id commands that were not properly formed.
check_svn_id.sh: will now automatically remove proper $Id$ commands.

commit 437ac47988ef7d97145878630921b59480f8fb8f
Author: Brad Bell <bradbell@…>
Date: Thu Dec 29 05:09:44 2016 -0700

Change swig module name so different for python and octave.,


CMakeLists.txt: remove a debugging print.

commit e8ac9cbe4b6de4c2a3c428092efb9227450da8b0
Author: Brad Bell <bradbell@…>
Date: Thu Dec 29 04:45:04 2016 -0700

  1. Add a an example of using swig with perl.
  2. Advance to cppad-20161229.
  3. Add missing Id at top of check_all.*.in files.

commit 6eb514493a8c38c6b768409c5f78d3ec2f53ba47
Author: Brad Bell <bradbell@…>
Date: Wed Dec 28 13:31:58 2016 -0700

Give octave and python modules different names to avoid cmake target confusion.

commit 83a2c29a13df2c8ec1588e5d50bd5999eea655bc
Author: Brad Bell <bradbell@…>
Date: Wed Dec 28 09:56:05 2016 -0700

Add script that coverts a python test to an octave test.

commit fdedf49579ff3887a8f65b26e58ac9bb2b8f7fd5
Author: Brad Bell <bradbell@…>
Date: Tue Dec 27 17:34:51 2016 -0700

Split out check_all as a simple driver for tests in a directory.
.gitignore: ignore *.pyc files where they are expected
check_copyright.sh: ignore .gitignore.

commit 8ee5ec65839db4ace33be7c368a1b66f9e7fca8f
Author: Brad Bell <bradbell@…>
Date: Tue Dec 27 11:32:03 2016 -0700

Initial testing of R + swig (R swig inteface not yet fully functional).

commit ed4afdc08b86f1cdfd3bd5be0d04fada2114ef05
Author: Brad Bell <bradbell@…>
Date: Tue Dec 27 05:27:54 2016 -0700

Advance to cppad-20161227.

commit aa8a3fe8844e1a8beb0edccaa84489dd8eaf5b92
Author: Brad Bell <bradbell@…>
Date: Tue Dec 27 05:26:53 2016 -0700

Use print_variable macro to simplify code.

commit 08d124752405de9c672bdb0d815c6d7beba7abf7
Author: Brad Bell <bradbell@…>
Date: Tue Dec 27 05:04:58 2016 -0700

  1. Return to using standard UseSWIG.cmake (uses .cxx for C++ files). print_variable.cmake: new utility for printing a variable. CMakeLists.txt: remove debugging print of a variable.

commit b83b26be7daa08521a8e61537987da065d9b1eab
Author: Brad Bell <bradbell@…>
Date: Mon Dec 26 15:12:06 2016 -0700

Simplify by changing extension used for c++ wrapper files.
use_swig.cmake: modified UseSWIG.cmake so uses .cpp (not .cxx) for wrappers.

commit 64a7c8b84583a24e67ceb7283b1cc485b50dccf0
Author: Brad Bell <bradbell@…>
Date: Mon Dec 26 09:36:32 2016 -0700

Advanced to cppad-20161226.

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1#! /bin/bash -e
2# -----------------------------------------------------------------------------
3# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell
4#
5# CppAD is distributed under multiple licenses. This distribution is under
6# the terms of the
7#                     Eclipse Public License Version 1.0.
8#
9# A copy of this license is included in the COPYING file of this distribution.
10# Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
11# -----------------------------------------------------------------------------
12if [ $0 != "bin/check_copyright.sh" ]
13then
14        echo "bin/check_copyright.sh: must be executed from its parent directory"
15        exit 1
16fi
17if [ ! -e .git ]
18then
19        echo 'This is not a git repository so cannot check copyright.'
20        echo 'check_copyright.sh: skipped'
21        exit 0
22fi
23list=`git status | sed -n \
24        -e '/^[#\t ]*deleted:/p' \
25        -e '/^[#\t ]*modified:/p' \
26        -e '/^[#\t ]*both modified:/p' \
27        -e '/^[#\t ]*renamed:/p' \
28        -e '/^[#\t ]*new file:/p' | \
29            sed -e 's/^.*: *//' -e 's/ -> /\n/' | \
30                        sed -e '/^makefile.in$/d' \
31                                -e '/^.gitignore$/d' \
32                                -e '/\/makefile.in$/d' \
33                                -e '/\/check_copyright.sh$/d' \
34                                -e '/AUTHORS/d' \
35                                -e '/COPYING/d' |
36                sort -u`
37cat << EOF > check_copyright.1.$$
38# Change copyright second year to current year
39s/Copyright (C) \\([0-9]*\\)-[0-9][0-9] Bradley M. Bell/Copyright (C) \\1-16 Bradley M. Bell/
40s/Copyright (C) \\([0-9]*\\)-20[0-9][0-9] Bradley M. Bell/Copyright (C) \\1-16 Bradley M. Bell/
41EOF
42ok=true
43for file in $list
44do
45        if [ -e $file ]
46        then
47                if ! grep 'Copyright (C) [0-9]*-[0-9][0-9]' $file > /dev/null
48                then
49                        echo "Cannot find copyright message in $file"
50                        exit 1
51                fi
52                sed -f check_copyright.1.$$ $file > check_copyright.2.$$
53                if ! diff $file check_copyright.2.$$ > /dev/null
54                then
55                        echo '----------------------------------------------------'
56                        echo "check_copyright.sh: automatic changes to $file:"
57                        if diff $file check_copyright.2.$$
58                        then
59                                echo 'bin/check_copyright.sh: program error'
60                                rm check_copyright.*.$$
61                                exit 1
62                        fi
63                        ok='no'
64                        if [ -x $file ]
65                        then
66                                mv check_copyright.2.$$ $file
67                                chmod +x $file
68                        else
69                                mv check_copyright.2.$$ $file
70                        fi
71                fi
72        fi
73done
74if [ "$ok" == 'no' ]
75then
76        rm check_copyright.*.$$
77        exit 1
78fi
79rm check_copyright.*.$$
80# ----------------------------------------------------------------------------
81echo "$0: OK"
82exit 0
Note: See TracBrowser for help on using the repository browser.