source: trunk/bin/package.sh @ 3680

Last change on this file since 3680 was 3680, checked in by bradbell, 5 years ago

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

commit 0bef506513a519e1073c6279d5c4cba9e5c3b180
Author: Brad Bell <bradbell@…>
Date: Thu May 7 12:14:32 2015 -0700

Add the acosh function (as an atomic operation when defined by compiler).

commit b3264fa17b2f65b65800423a0e243c9c3ccfe06a
Author: Brad Bell <bradbell@…>
Date: Wed May 6 20:25:38 2015 -0700

CMakeLists.txt: Change so test only check for compliation.

commit dcbac4d4f20cc383f2bd9edb02036659df40b791
Author: Brad Bell <bradbell@…>
Date: Wed May 6 15:06:28 2015 -0700

asinh.cpp: check higher orders, relax accuracy on test.

commit 5f8881993fedd18cccc3c74831133a8f8a9d17b0
Author: Brad Bell <bradbell@…>
Date: Wed May 6 14:36:18 2015 -0700

Change Acos to acos.
acos.cpp: remove trailing white space.

commit e828fa1f7c4c3848c727f14b1b7a8030071ee705
Author: Brad Bell <bradbell@…>
Date: Wed May 6 12:07:35 2015 -0700

Change Acos to acos.
acos.cpp: remove redundant index commands, remove trailing with space.

commit 3d16e5b9fe1bdafa4ad01d1d466bb72b792650fa
Author: Brad Bell <bradbell@…>
Date: Wed May 6 11:30:49 2015 -0700

op_code.hpp: Minor edits to AcosOp? commnets.

commit 58beaaad149b4ac29fae44589d7f8900bf8f4c40
Author: Brad Bell <bradbell@…>
Date: Wed May 6 10:51:43 2015 -0700

for_jac_sweep.hpp: Add missing AsinhOp? case.

commit 623c134870c522ae5e80bcf0f89d230902594c80
Author: Brad Bell <bradbell@…>
Date: Wed May 6 10:27:39 2015 -0700

Fix comment about AsinhOp? operator.

commit 226b14f6f4810f5abf1ca247aae541963efaf4d6
Author: Brad Bell <bradbell@…>
Date: Wed May 6 10:14:08 2015 -0700

Add derivative of F to make order zero case clearer.
acos_reverse.omh: Fix some sign errors.
asin_reverse.omh: Fix typo.
acos_forward.omh: Simplify by distributing minus sign.

commit 4682f4ee73e33b600b180086576e986f636a24dc
Author: Brad Bell <bradbell@…>
Date: Wed May 6 08:15:50 2015 -0700

acos_forward.omh: fix sign that depends on acos versus acosh.

commit 906ae10adf019ddda7f57dd165aab08fc55289c4
Author: Brad Bell <bradbell@…>
Date: Wed May 6 07:09:47 2015 -0700

  1. Fix inclusion of some temporary files in package (e.g., git_commit.sh).
  2. Simplify and improve using git ls-files and ls bin/check_*.
  3. Remove trailing white space.

commit 5096f4706a547bd76caa3766aa2c62802ef7f0bf
Author: Brad Bell <bradbell@…>
Date: Wed May 6 06:41:20 2015 -0700

Combine base type documentation for erf, asinh
(will add more functions to this list list).

commit b3535db5ad95bee90672abcaa686032d23bce2fc
Author: Brad Bell <bradbell@…>
Date: Tue May 5 18:01:11 2015 -0700

  1. Change Arc Cosine/Sine? to Inverse Cosine/Sine?.
  2. Change arcsin-> asin and arccos->acos.
  3. Remove index commands that are duplicates of words in titles.


acos_reverse.omh: Add acosh case to this page.

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 4.9 KB
Line 
1#! /bin/bash -e
2# $Id: package.sh 3680 2015-05-07 19:17:37Z bradbell $
3# -----------------------------------------------------------------------------
4# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 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 [ $0 != "bin/package.sh" ]
14then
15        echo "bin/package.sh: must be executed from its parent directory"
16        exit 1
17fi
18echo_log_eval() {
19        echo $*
20        echo $* >> $top_srcdir/package.log
21        if ! eval $* >> $top_srcdir/package.log
22        then
23                echo "Error: check package.log"
24                exit 1
25        fi
26}
27log_eval() {
28        echo $* >> $top_srcdir/package.log
29        if ! eval $* >> $top_srcdir/package.log
30        then
31                echo "Error: check package.log"
32                exit 1
33        fi
34}
35if [ -e package.log ]
36then
37        echo "rm package.log"
38        rm package.log
39fi
40top_srcdir=`pwd`
41# ----------------------------------------------------------------------------
42this_license=`\
43        grep '$verbatim%' omh/license.omh | sed -e 's|$verbatim%\(...\).*|\1|'`
44if [ "$this_license" == 'epl' ]
45then
46        remove_list='gpl-3.0.txt bin/gpl_license.sh'
47elif [ "$this_license" == 'gpl' ]
48then
49        remove_list='epl-v10.txt epl-v10.html bin/gpl_license.sh'
50else
51        echo 'bin/package.sh: cannot find license in omh/license.omh'
52        exit 1
53fi
54# ----------------------------------------------------------------------------
55# Automated updates to source directory
56#
57# Get version number and make sure all copies of it are up to date.
58version=`bin/version.sh get`
59echo_log_eval bin/version.sh get
60echo_log_eval bin/version.sh copy
61# ----------------------------------------------------------------------------
62# Run automated checking of file names in original source directory
63# (check_include_omh.sh uses files built by cmake)
64list=`ls bin/check_* | sed \
65        -e '/check_all.sh/d' \
66        -e '/check_jenkins.sh/d' \
67        -e '/check_svn_dist.sh/d'`
68for check in $list
69do
70        echo_log_eval $check
71done
72# ----------------------------------------------------------------------------
73# Check for doxygen errors
74echo_log_eval bin/run_doxygen.sh
75# ----------------------------------------------------------------------------
76# Create the package directory
77package_dir="build/cppad-$version"
78if [ -e "$package_dir" ]
79then
80        echo_log_eval rm -r $package_dir
81fi
82for lic in epl gpl
83do
84        if [ -e "$package_dir.epl.tgz" ]
85        then
86                echo_log_eval rm $package_dir.$lic.tgz
87        fi
88done
89echo_log_eval mkdir -p $package_dir
90# -----------------------------------------------------------------------------
91# Source file that are coppied to the package directory
92file_list=`git ls-files`
93#
94# Copy the files, creating sub-directories when necessary
95echo_log_eval echo "copy files to $package_dir"
96for file in $file_list $other_files
97do
98        sub_dir=`echo $file | sed -e 's|\(.*\)/[^/]*$|\1|'`
99        if [ "$sub_dir" != "$file" ]
100        then
101                if [ ! -e "$package_dir/$sub_dir" ]
102                then
103                        log_eval mkdir -p $package_dir/$sub_dir
104                fi
105        fi
106        log_eval cp $file $package_dir/$file
107done
108echo_log_eval echo "remove certain files from $package_dir"
109for file in $remove_list
110do
111        if [ -e $package_dir/$file ]
112        then
113                echo_log_eval rm $package_dir/$file
114        fi
115done
116# ----------------------------------------------------------------------------
117# build the xml version of documentation for this distribution
118echo_log_eval cd $package_dir
119#
120# Only include the *.xml verison of the documentation in distribution
121# So remove the table at the top (but save the original doc.omh file).
122if ! grep < doc.omh > /dev/null \
123        'This comment is used to remove the table below'
124then
125        echo "Missing comment expected in doc.omh"
126        exit 1
127fi
128echo_log_eval echo "sed -i.save doc.omh ..."
129sed -i.save doc.omh \
130        -e '/This comment is used to remove the table below/,/$tend/d'
131#
132# This command creates omhelp.xml.log in current directory (and says so)
133echo_log_eval echo "bin/run_omhelp.sh xml"
134if ! bin/run_omhelp.sh xml
135then
136        echo_log_eval cp omhelp.xml.log $top_srcdir/omhelp.xml.log
137        exit 1
138fi
139# Copy the log to the directory where the package.sh command was executed
140echo_log_eval cp omhelp.xml.log $top_srcdir/omhelp.xml.log
141# Restore the original doc.omh
142echo_log_eval mv doc.omh.save doc.omh
143# ----------------------------------------------------------------------------
144# change back to the package parent directory and create the tarball
145echo_log_eval cd ..
146echo_log_eval tar -czf cppad-$version.$this_license.tgz cppad-$version
147# ----------------------------------------------------------------------------
148# create gpl version of package
149echo_log_eval cd $top_srcdir
150if [ -e 'bin/gpl_license.sh' ]
151then
152        if [ "$this_license" != 'epl' ]
153        then
154                echo 'package.sh: bin/gpl_license.sh found in gpl verison of source.'
155                exit 1
156        fi
157        echo_log_eval bin/gpl_license.sh cppad-$version build build
158fi
Note: See TracBrowser for help on using the repository browser.