1 | #!/bin/sh |
---|
2 | # |
---|
3 | # $Is$ |
---|
4 | # |
---|
5 | homeidl=$1 |
---|
6 | homesaxo=$2 |
---|
7 | homesrc=$3 |
---|
8 | version=$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 | # |
---|
17 | cat <<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> |
---|
28 | EOF |
---|
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 |
---|
32 | sed -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 |
---|
40 | sed -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 |
---|
49 | sed -e "s?ref=\"?ref=\"${homeidl}/?g" \ |
---|
50 | ${homeidl}/home.html > ${homesrc}/home.html |
---|
51 | # add line for SAXO Directory after the first </h3> |
---|
52 | cat << 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"/>   <a href="${homesaxo}/home.html">SAXO Directory</a></p> |
---|
54 | EOF |
---|
55 | numline=$( grep -n '</h3>' ${homesrc}/home.html | head -1 | cut -b1-2 ) |
---|
56 | sed -e "${numline}r /tmp/toto$$" ${homesrc}/home.html > /tmp/toto2$$ |
---|
57 | mv -f /tmp/toto2$$ ${homesrc}/home.html |
---|
58 | # add line for SAXO Home Page after the last </h3> |
---|
59 | cat << 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"/>   <a href="http://forge.ipsl.jussieu.fr/saxo">SAXO Home Page</a> </p> |
---|
61 | EOF |
---|
62 | numline=$( grep -n '</h3>' ${homesrc}/home.html | tail -1 | cut -b1-2 ) |
---|
63 | sed -e "${numline}r /tmp/toto$$" ${homesrc}/home.html > /tmp/toto2$$ |
---|
64 | mv -f /tmp/toto2$$ ${homesrc}/home.html |
---|
65 | # put the complete path of the images except for SAXOIDL_OnlineHelp_title.png |
---|
66 | sed -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$$ |
---|
69 | mv -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 |
---|
75 | sed -e '/@/d' ${homesaxo}/../../overview > ${homesrc}/aboutsaxo.txt |
---|
76 | # add a link to saxo page |
---|
77 | cat <<EOF >> ${homesrc}/aboutsaxo.txt |
---|
78 | |
---|
79 | More informations on |
---|
80 | http://forge.ipsl.jussieu.fr/saxo |
---|
81 | |
---|
82 | EOF |
---|