source: projects/ckbs/trunk/copy_doc.sh @ 416

Last change on this file since 416 was 416, checked in by bradbell, 10 years ago

Prepare for new stable verison and release.

ckbs.omh: update installaition and test instructions.
copy_doc.sh: user set -e (exit on error) to simplify script.
new_stable.sh: user set -e (exit on error) to simplify script.

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#! /bin/bash -eu
2# -------------------------------------------------------------------
3# ckbs: Constrained Kalman-Bucy Smoother Program: Copyright (C) 2006
4# Authors: Bradlely Bell:        bradbell at washington dot edu
5#          Gianluigi Pillonetto: giapi at dei dot unipd dot it
6# License: GNU General Public License Version 2
7# -------------------------------------------------------------------
8# exit on any error
9set -e
10#
11# check that this is the trunk
12dir=`pwd | sed -e 's|.*/ckbs/||'`
13if [ "$dir" != "trunk" ]
14then
15        echo "copy_doc.sh: can only be run in the trunk."
16        echo "To change the documentation for a stable version,"
17        echo "use ./build_doc.sh and commit changes in doc/*"
18        exit 1
19fi
20#
21echo "Determining current documentation version number"
22version=`date +%F | sed -e 's|-||g' -e 's|^|0.|'`
23echo "version = $version"
24#
25echo "Changing verison number in ckbs.omh"
26sed -i ckbs.omh -e "s/ckbs-[0-9.]\{10\}/ckbs-$version/"
27#
28echo "./build_doc.sh"
29./build_doc.sh
30#
31echo "cd doc"
32cd doc
33#
34if [ ! -e html ]
35then
36        echo "svn checkout \\"
37        echo "  https://projects.coin-or.org/svn/CoinBazaar/html/ckbs html"
38        svn checkout https://projects.coin-or.org/svn/CoinBazaar/html/ckbs html
39else
40        echo "svn update html"
41        svn update html
42fi
43#
44old_list=`ls html/* | sed -e 's|html/||'`
45for file in $old_list
46do
47        if [ ! -e $file ]
48        then
49                echo "svn delete html/$file"
50                svn delete html/$file
51        fi
52done
53#
54new_list=`ls * | sed -e 's|html:||'`
55for file in $new_list
56do
57        if [ ! -e html/$file ]
58        then
59                echo "cp $file html/$file"
60                cp $file html/$file
61                #
62                echo "svn add html/$file"
63                svn add html/$file
64        else
65                echo "cp $file html/$file"
66                cp $file html/$file
67        fi
68done
69echo ""
70echo "To see the differences use:"
71echo "  svn diff doc/html"
72echo "To commit the changes use:"
73echo "  svn commit -m \"[html/ckbs] message\" doc/html"
74echo "to commit the changes."
Note: See TracBrowser for help on using the repository browser.