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

Last change on this file since 96 was 96, checked in by bradbell, 11 years ago

[cbks/trunk] Add image link from each documentation page to ckbs home page.

Lines containing a colon character are "file name" followed by comment; e.g.,
ckbs.omh: Add links to xml, htm, and printable, add Purpose.
copy_doc.sh: always run build_doc.sh.
build_doc.sh: add image link to ckbs home page.

  • Property svn:executable set to *
File size: 1.7 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# If this is the trunk, then update the version number
9dir=`pwd | sed -e 's|.*/ckbs/||'`
10if [ "$dir" != "trunk" ]
11then
12        echo "copy_doc.sh: should only be run in the trunk."
13        echo "For stable versions use ./build_doc.sh and commit changes in doc/*"
14        exit 1
15fi
16version=`date +%F | sed -e 's|-||g' -e 's|^|0.|'`
17sed -i ckbs.omh -e "s/ckbs-[0-9.]\{10\}/ckbs-$version/"
18#
19echo "./build_doc.sh"
20if ! ./build_doc.sh
21then
22        echo "copy_doc.sh: ./build_doc.sh error"
23        exit 1
24fi
25#
26echo "cd doc"
27cd doc
28#
29if [ ! -e html ]
30then
31        echo "svn checkout \\"
32        echo "  https://projects.coin-or.org/svn/CoinBazaar/html/ckbs html"
33        svn checkout https://projects.coin-or.org/svn/CoinBazaar/html/ckbs html
34else
35        echo "svn update html"
36        svn update html
37fi
38#
39old_list=`ls html/* | sed -e 's|html/||'`
40for file in $old_list
41do
42        if [ ! -e $file ]
43        then
44                echo "svn delete html/$file"
45                svn delete html/$file
46        fi
47done
48#
49new_list=`ls * | sed -e 's|html:||'`
50for file in $new_list
51do
52        if [ ! -e html/$file ]
53        then
54                echo "cp $file html/$file"
55                cp $file html/$file
56                #
57                echo "svn add html/$file"
58                svn add html/$file
59        else
60                echo "cp $file html/$file"
61                cp $file html/$file
62        fi
63done
64echo ""
65echo "To see the differences use:"
66echo "  svn diff doc/html"
67echo "To commit the changes use:"
68echo "  svn commit -m \"[html/ckbs] message\" doc/html"
69echo "to commit the changes."
Note: See TracBrowser for help on using the repository browser.