source: trunk/SRC/Documentation/xmldoc/mergeonline_help.sh @ 178

Last change on this file since 178 was 177, checked in by smasson, 18 years ago

updates of html files...

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1#!/bin/sh
2#
3# $Is$
4#
5homeidl=$1
6homesaxo=$2
7homesrc=$3
8version=$4
9#
10#############################################################
11# create the file saxoidl.adp from idl.adp and idldoc-lib.adp
12#############################################################
13# create saxoidl.adp header
14[ ! -f ${homeidl}/idl.adp ] && exit 1
15[ ! -f ${homesaxo}/idldoc-lib.adp ] && exit 1
16#
17cat <<EOF > ${homesrc}/idl.adp
18<!DOCTYPE DCF> 
19<assistantconfig version="3.3.0"> 
20   <profile> 
21      <property name="name">SAXO - IDL ${version} Help</property> 
22      <property name="title">SAXO - IDL ${version} Help</property> 
23      <property name="startpage">${homesrc}/home.html</property> 
24      <property name="aboutmenutext">About SAXO</property> 
25      <property name="abouturl">${homesrc}/aboutsaxo.txt</property> 
26      <property name="assistantdocs">${homeidl}</property> 
27   </profile> 
28EOF
29# extract part from </profile> to </assistantconfig>
30# put the complete path of the references
31# and put it at the end of idl.adp
32sed -e '1,/<\/profile>/ d' \
33    -e '/<\/assistantconfig>/,$ d' \
34    -e "s?ref=\"?ref=\"${homeidl}/?g" \
35    ${homeidl}/idl.adp  >> ${homesrc}/idl.adp
36
37# extract part from </profile>
38# put the complete path of the references
39# and put it at the end of idl.adp
40sed -e '1,/<\/profile>/ d' \
41    -e "s?ref=\"?ref=\"${homesaxo}/?g" \
42    ${homesaxo}/idldoc-lib.adp >> ${homesrc}/idl.adp
43
44#############################################################
45# create the file home.html from the one installed with IDL
46#############################################################
47[ ! -f ${homeidl}/home.html ] && exit 1
48# put the complete path of the references
49sed -e "s?ref=\"?ref=\"${homeidl}/?g" \
50    ${homeidl}/home.html > ${homesrc}/home.html
51# add line for SAXO Directory after the first </h3>
52cat << EOF > /tmp/toto$$
53<a name="SAXOdir"> </a><p class="pIndentedRelative"><img src="images/blueball_idl.gif" id="blueballSAXOdir" border="0" hspace="0" vspace="0"/> &#160;&#160;<a href="${homesaxo}/home.html">SAXO Directory</a></p>
54EOF
55numline=$( grep -n '</h3>' ${homesrc}/home.html | head -1 | cut -b1-2 )
56sed -e "${numline}r /tmp/toto$$" ${homesrc}/home.html > /tmp/toto2$$ 
57mv -f /tmp/toto2$$ ${homesrc}/home.html
58# add line for SAXO Home Page after the last </h3>
59cat << EOF > /tmp/toto$$
60<a name="SAXOweb"> </a><p class="pIndentedRelative"><img src="images/blueball_idl.gif" id="blueballSAXOweb" border="0" hspace="0" vspace="0"/> &#160;&#160;<a href="http://forge.ipsl.jussieu.fr/saxo">SAXO Home Page</a> </p> 
61EOF
62numline=$( grep -n '</h3>' ${homesrc}/home.html | tail -1 | cut -b1-2 )
63sed -e "${numline}r /tmp/toto$$" ${homesrc}/home.html > /tmp/toto2$$ 
64mv -f /tmp/toto2$$ ${homesrc}/home.html
65# put the complete path of the images except for SAXOIDL_OnlineHelp_title.png
66sed -e "s?src=\"?src=\"${homeidl}/?g" \
67    -e "s?src=\".*IDL_OnlineHelp_Title\.gif\"?src=\"${homesaxo}/../xmldoc/images/SAXOIDL_OnlineHelp_title\.png\"?g" \
68    ${homesrc}/home.html > /tmp/toto$$ 
69mv -f /tmp/toto$$ ${homesrc}/home.html
70#############################################################
71# create the file aboutsaxo.txt from overview
72#############################################################
73[ ! -f ${homeidl}/home.html ] && exit 1
74# remove the line with @ in the file overview
75sed -e '/@/d' ${homesaxo}/../../overview > ${homesrc}/aboutsaxo.txt
76# add a link to saxo page
77cat <<EOF >> ${homesrc}/aboutsaxo.txt
78
79More informations on
80http://forge.ipsl.jussieu.fr/saxo
81
82EOF
Note: See TracBrowser for help on using the repository browser.