source: branches/cache/bin/check_svn_id.sh @ 3324

Last change on this file since 3324 was 3324, checked in by bradbell, 6 years ago

merge trunk changes into cache

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1#! /bin/bash -e
2# $Id: check_svn_id.sh 3324 2014-09-12 12:14:53Z bradbell $
3# -----------------------------------------------------------------------------
4# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
5#
6# CppAD is distributed under multiple licenses. This distribution is under
7# the terms of the
8#                     Eclipse Public License Version 1.0.
9#
10# A copy of this license is included in the COPYING file of this distribution.
11# Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
12# -----------------------------------------------------------------------------
13if [ ! -e "bin/check_svn_id.sh" ]
14then
15        echo "bin/check_svn_id.sh: must be executed from its parent directory"
16        exit 1
17fi
18# -----------------------------------------------------------------------------
19echo "Checking for \$Id:.*\$ in beginning of source code"
20echo "-------------------------------------------------------" 
21ok="yes"
22list=`bin/list_files.sh .hpp .cpp .omh .sh .in .am .txt | sed \
23        -e '/^gpl-3.0.txt$/d' \
24        -e '/^epl-v10.txt$/d' \
25        -e '/cppad\/local\/config.h.in$/d' \
26        -e '/^makefile.in$/d' \
27        -e '/^svn_commit.sh$/d' \
28        -e '/\/makefile.in$/d' `
29#
30for file in $list
31do
32        if ! head -2 $file | grep '$Id:.*\$' > /dev/null
33        then
34                echo "$file does not have '\$Id:.*\$' in first two lines"
35                ok="no"
36        fi
37done
38echo "-------------------------------------------------------" 
39if [ "$ok" = "no" ]
40then
41        echo "Error: nothing should be between the two dashed lines above"
42        exit 1
43else
44        echo "Ok: nothing is between the two dashed lines above"
45        exit 0
46fi
Note: See TracBrowser for help on using the repository browser.