[144] | 1 | #!/bin/bash |
---|
[186] | 2 | # |
---|
[123] | 3 | # update : |
---|
| 4 | # $Id$ |
---|
[188] | 5 | # fplod 2006-09-20T16:34:38Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 6 | # suppress ?format=raw |
---|
| 7 | # fplod 2006-09-20T15:30:15Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 8 | # add copy of html files unedr xmldoc and idldoc_htlm_output on |
---|
| 9 | # saxo@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/ |
---|
| 10 | # see dodocdownload |
---|
[187] | 11 | # fplod 2006-09-20T11:05:23Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 12 | # correction to really suppress date in idldoc assistant outputs (font |
---|
| 13 | # instaed of div in html output) |
---|
[183] | 14 | # fplod 2006-09-18T13:25:12Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 15 | # add status checking after makehtml.sh |
---|
[182] | 16 | # smasson Fri Sep 15 10:42:01 CEST 2006 |
---|
| 17 | # merge idldoc html and idldoc assistant |
---|
[179] | 18 | # smasson Thu Sep 14 15:19:23 CEST 2006 |
---|
| 19 | # add the revision number in the name of SAXO_SRC_*.tar.gz |
---|
[176] | 20 | # smasson Wed Sep 13 14:18:02 CEST 2006 |
---|
| 21 | # add the directory-overview.html from dir-files.html in idldoc_html_output |
---|
[170] | 22 | # fplod 2006-09-07T08:09:47Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 23 | # main is rename to websaxo |
---|
[168] | 24 | # fplod 2006-09-05T15:39:47Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 25 | # add Source link in idldoc html outpout |
---|
[163] | 26 | # snlod/fplod 2006-08-25T08:30:36Z electre.locean-ipsl.upmc.fr (Darwin) |
---|
| 27 | # add for idldoc assistant |
---|
[156] | 28 | # fplod 2006-08-17T09:19:06Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
[183] | 29 | # add transformation after idldoc to force non-proportional font |
---|
[156] | 30 | # on bloc delimited by |
---|
[163] | 31 | # <fixe> |
---|
| 32 | # </fixe> |
---|
[156] | 33 | # in .pro files (with modification of css) |
---|
| 34 | # !! do not replace \ by \\ inside this block |
---|
| 35 | # !! replace \ by an other character is a good idea |
---|
| 36 | # cf. example in ToBeReviewed/TRIANGULATION/definetri.pro |
---|
[144] | 37 | # fplod 2006-07-21T08:23:52Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 38 | # add mini_notice production |
---|
[140] | 39 | # fplod 2006-07-11T08:26:05Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 40 | # commented tidy in dohtml section is moved in makehtml |
---|
[135] | 41 | # fplod 2006-07-10T08:22:53Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 42 | # ajout de white-space: pre; dans la css pour file_comments |
---|
[123] | 43 | # fplod 2006-07-04T13:09:19Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
[186] | 44 | # for idldoc html output |
---|
[123] | 45 | # because preformat option doesn't seem to work well |
---|
[186] | 46 | # replace |
---|
[123] | 47 | # div class="value" |
---|
| 48 | # by |
---|
| 49 | # div class="preformat" |
---|
[111] | 50 | # fplod 2006-06-19T08:46:39Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
[186] | 51 | # for idldoc html output |
---|
[111] | 52 | #. replace |
---|
| 53 | # -e 's/\(href=".*\)\(\.html\)\("\)/\1\2?format=raw\3/g' \ |
---|
| 54 | # -e 's/\(href=".*\)\(\.html\)\(#.*"\)/\1\2?format=raw\3/g' \ |
---|
[123] | 55 | # -e 's/\(src=".*\)\(\.html\)\("\)/\1\2?format=raw\3/g' \ |
---|
[186] | 56 | # by |
---|
[111] | 57 | # -e 's@\(href="[^.]*[^h]*[^t]*[^m]*[^l]*[^"]*\)\(\.html\)\("\)@\1\2?format=raw\3@g' \ |
---|
| 58 | # -e 's@\(href="[^.]*[^h]*[^t]*[^m]*[^l]*[^"]*\)\(\.html\)\(#.*"\)@\1\2?format=raw\3@g' \ |
---|
| 59 | #-e 's@\(src="[^.]*[^h]*[^t]*[^m]*[^l]*[^"]*\)\(\.html\)\("\)@\1\2?format=raw\3@g' |
---|
| 60 | # in order to be able to add ?format=raw several time on one line |
---|
[186] | 61 | # . suppress .html in line like |
---|
[111] | 62 | # a parameter from the routine ./ReadWrite/idl-NetCDF/ncdf_read.html |
---|
| 63 | # in files idldoc-index*.html |
---|
[109] | 64 | # fplod 2006-06-14T12:41:37Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
[183] | 65 | # add embed parameter idldoc instructions to try to fix ticket#17 |
---|
[91] | 66 | # fplod 2006-06-07T12:11:50Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
[186] | 67 | # add g option in ?format=raw sed transformation in order to fix |
---|
[91] | 68 | # link on top of idldoc like directory-overview.html |
---|
[90] | 69 | # fplod 2006-06-07T10:57:35Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 70 | # add ?format=raw in idldoc production for frames |
---|
[89] | 71 | # fplod 2006-06-07T08:14:15Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 72 | # add action for idldochtml |
---|
[86] | 73 | # fplod 2006-06-02T14:28:30Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 74 | # modification to produce tar files in /tmp/saxo_${$} when dotar=1 |
---|
| 75 | # modification to copy tar files on http://forge.ipsl.jussieu.fr/saxo/download/ |
---|
| 76 | # when doforge=1 |
---|
| 77 | # produce tar files in /tmp/saxo_${$} when dotar=1 |
---|
| 78 | set -x |
---|
| 79 | set -u |
---|
| 80 | # |
---|
[188] | 81 | docompileall=0 |
---|
[86] | 82 | dohtml=0 |
---|
| 83 | dooldtest=0 |
---|
[107] | 84 | doidlwavedoc=0 |
---|
[182] | 85 | doidldoc=0 |
---|
[116] | 86 | doTARsrc=0 |
---|
[88] | 87 | doTARdata=0 |
---|
[116] | 88 | doforge=0 |
---|
[88] | 89 | doSRClodyc=0 |
---|
| 90 | doDTAlodyc=0 |
---|
[100] | 91 | doSRCipsl=0 |
---|
| 92 | doDTAipsl=0 |
---|
| 93 | doSRCidris=0 |
---|
| 94 | doDTAidris=0 |
---|
[188] | 95 | dodocdownload=1 |
---|
[86] | 96 | # |
---|
[100] | 97 | case $( whoami ) in |
---|
| 98 | smasson) |
---|
| 99 | lgforge=smasson |
---|
| 100 | ;; |
---|
| 101 | floseb) |
---|
| 102 | lgforge=smasson |
---|
| 103 | ;; |
---|
| 104 | *) |
---|
| 105 | lgforge=saxo |
---|
| 106 | ;; |
---|
| 107 | esac |
---|
[88] | 108 | # |
---|
[100] | 109 | if [ ${lgforge} != smasson ] |
---|
| 110 | then |
---|
| 111 | doSRClodyc=0 |
---|
| 112 | doDTAlodyc=0 |
---|
| 113 | doSRCipsl=0 |
---|
| 114 | doDTAipsl=0 |
---|
| 115 | doSRCidris=0 |
---|
| 116 | doDTAidris=0 |
---|
[186] | 117 | fi |
---|
[100] | 118 | # |
---|
[88] | 119 | # get the date in a nice format |
---|
| 120 | # |
---|
| 121 | ndate=`date +%Y%m%d` |
---|
[179] | 122 | rev=$( svn info | grep -i revision | awk '{print $NF}' ) |
---|
[86] | 123 | # memorize current directory |
---|
| 124 | memopwd=$(pwd) # should be <working space>/SRC/Documentation/xmldoc |
---|
[100] | 125 | # |
---|
[88] | 126 | #------------------------------------------------------------------ |
---|
[100] | 127 | if [ ${docompileall} -eq 1 ] |
---|
| 128 | then |
---|
| 129 | cat <<EOF > /tmp/compileall${$}.pro |
---|
[186] | 130 | .reset_session |
---|
[114] | 131 | ; |
---|
[100] | 132 | !path = expand_path('+' + '../..') + ':' + expand_path('+' + !dir) |
---|
[115] | 133 | resolve_all, resolve_either='def_myuniquetmpdir', skip_routines = ['xxx2ps','trends', 'label_gmt'] |
---|
| 134 | resolve_all, resolve_either = 'find', skip_routines = ['xxx2ps','trends', 'label_gmt'] |
---|
[114] | 135 | def_myuniquetmpdir |
---|
| 136 | oldcm = find('oldcm_empty') |
---|
| 137 | ;oldcm = find('oldcm_full') |
---|
| 138 | oldcm = oldcm[0] |
---|
| 139 | @cm_general |
---|
| 140 | file_copy, oldcm, myuniquetmpdir + 'oldcm_used.pro', /overwrite |
---|
| 141 | IF !journal NE 0 THEN journal |
---|
| 142 | journal, myuniquetmpdir + 'cm_demomode_used.pro' |
---|
[186] | 143 | journal |
---|
[114] | 144 | ; |
---|
[115] | 145 | resolve_all, resolve_either='keep_compatibility', skip_routines = ['xxx2ps','trends', 'label_gmt'] |
---|
[114] | 146 | ; |
---|
[100] | 147 | EOF |
---|
| 148 | # |
---|
[115] | 149 | for i in $( find ${memopwd}/../.. -name "*.pro" | grep -iv label_gmt ) |
---|
[100] | 150 | do |
---|
[115] | 151 | # does it contains pro or function ? |
---|
| 152 | egrep -iq '^ * *(pro|function)' $i |
---|
[100] | 153 | if [ $? -eq 0 ] |
---|
| 154 | then |
---|
[115] | 155 | echo "print, '$( basename $i .pro ) :'" >> /tmp/compileall${$}.pro |
---|
| 156 | echo "resolve_all, resolve_either = '$( basename $i .pro )', skip_routines = ['xxx2ps','trends', 'label_gmt']" >> /tmp/compileall${$}.pro |
---|
[100] | 157 | fi |
---|
| 158 | done |
---|
| 159 | echo exit >> /tmp/compileall${$}.pro |
---|
| 160 | IDL_STARTUP=/tmp/compileall${$}.pro |
---|
[120] | 161 | ${IDL_DIR}/bin/idl &> /tmp/compileallerr_${$} |
---|
[100] | 162 | echo |
---|
| 163 | echo |
---|
[114] | 164 | grep -i "error" /tmp/compileallerr_${$} |
---|
| 165 | # grep -q "Compilation error(s)" /tmp/compileallerr_${$} |
---|
[186] | 166 | if [ ${?} -ne 0 ] |
---|
[105] | 167 | then |
---|
| 168 | echo "ALL SAXO files are OK..." |
---|
| 169 | rm -f /tmp/compileallerr_${$} /tmp/compileall${$}.pro |
---|
| 170 | else |
---|
| 171 | grep "Compilation error(s)" /tmp/compileallerr_${$} |
---|
| 172 | echo "eee : see /tmp/compileallerr_${$}" |
---|
[115] | 173 | more /tmp/compileallerr_${$} |
---|
[105] | 174 | exit 1 |
---|
| 175 | fi |
---|
[100] | 176 | echo |
---|
| 177 | echo |
---|
| 178 | fi |
---|
| 179 | #------------------------------------------------------------------ |
---|
[86] | 180 | if [ ${dohtml} -eq 1 ] |
---|
| 181 | then |
---|
| 182 | # |
---|
| 183 | # redo the html file |
---|
| 184 | # |
---|
| 185 | cd ${memopwd} |
---|
[186] | 186 | for docxml in firststeps.xml getsaxo.xml mailing.xml websaxo.xml tiplink.xml updatesaxo.xml whatissaxo.xml whatsnew.xml infoupdatekwd.xml infoupdatecm.xml mini_notice.xml faqsaxo.xml |
---|
[86] | 187 | do |
---|
[140] | 188 | ./makehtml.sh $(basename ${docxml} .xml) |
---|
[183] | 189 | status=${?} |
---|
| 190 | if [ ${status} -ne 0 ] |
---|
| 191 | then |
---|
| 192 | echo "eee : pb with makehtml.sh $(basename ${docxml} .xml)" |
---|
| 193 | exit 1 |
---|
| 194 | fi |
---|
[86] | 195 | done |
---|
| 196 | fi |
---|
[88] | 197 | #------------------------------------------------------------------ |
---|
[86] | 198 | if [ ${dooldtest} -eq 1 ] |
---|
| 199 | then |
---|
| 200 | # make the old test |
---|
| 201 | # |
---|
| 202 | cd ${memopwd}/../../Tests/ |
---|
| 203 | ./makeold.sh |
---|
| 204 | exit 0 |
---|
| 205 | fi |
---|
[88] | 206 | #------------------------------------------------------------------ |
---|
[86] | 207 | if [ ${doidlwavedoc} -eq 1 ] |
---|
| 208 | then |
---|
| 209 | # |
---|
| 210 | # redo idlwave doc |
---|
| 211 | # |
---|
[107] | 212 | cd ${memopwd}/../.. |
---|
[86] | 213 | Documentation/idlwave_catalog -v -f saxo |
---|
| 214 | exit 0 |
---|
| 215 | fi |
---|
[88] | 216 | #------------------------------------------------------------------ |
---|
[182] | 217 | if [ ${doidldoc} -eq 1 ] |
---|
[86] | 218 | then |
---|
| 219 | # |
---|
[89] | 220 | # build a idl file to launch idldoc |
---|
[111] | 221 | output=../idldoc_html_output/ |
---|
| 222 | log="/tmp/idldochtlm_${$}.log" |
---|
| 223 | pro="/tmp/idldochtlm_${$}.pro" |
---|
| 224 | cat <<EOF > ${pro} |
---|
[89] | 225 | !path = expand_path('+' + '../idldoc/') |
---|
| 226 | print,!path |
---|
[111] | 227 | idldoc,root="../../",title="SAXO Documentation", $ |
---|
| 228 | LOG_FILE="${log}", $ |
---|
[163] | 229 | output="${output}", $ |
---|
| 230 | overview="../../overview", /statistics, /preformat, /embed |
---|
[89] | 231 | exit |
---|
| 232 | EOF |
---|
| 233 | # launch idl with the file built above |
---|
[120] | 234 | IDL_STARTUP=${pro};${IDL_DIR}/bin/idl |
---|
[111] | 235 | /bin/rm ${pro} |
---|
[89] | 236 | # In order to do not have to many revision in svn, we modify some |
---|
| 237 | # lines produced by idldoc : |
---|
[168] | 238 | # - add Source link in each html file |
---|
| 239 | # example : |
---|
| 240 | # <td>Source</td> |
---|
| 241 | # will be replaced by |
---|
[188] | 242 | # <td><a href="../../Calendar/caldat.pro" title="Source code of a file">Source</a></td> |
---|
[168] | 243 | # |
---|
| 244 | # - remove date and time of idldoc production |
---|
[89] | 245 | # examples : |
---|
| 246 | # <!-- Generated by IDLdoc 2.0 on Wed Jun 7 10:25:28 2006 --> |
---|
| 247 | # will be replaced by |
---|
| 248 | # <!-- Generated by IDLdoc 2.0 --> |
---|
| 249 | # <div id="tagline">Produced by IDLdoc 2.0 on Wed Jun 7 10:54:37 2006.</div |
---|
| 250 | # will be replaced by |
---|
| 251 | # <div id="tagline">Produced by IDLdoc 2.0</div> |
---|
| 252 | # <h2>Produced on Wed Jun 7 10:23:13 2006</h2> |
---|
[186] | 253 | # will be delete |
---|
| 254 | # other lines will be deleted because the time is the time of checkout not |
---|
[89] | 255 | # the time of revision. |
---|
| 256 | # the sequence of lines |
---|
| 257 | #<dl> |
---|
| 258 | # <dt>Last modification:</dt> |
---|
| 259 | # <dd>Fri Jun 2 11:46:24 2006</dd> |
---|
| 260 | # </dl> |
---|
| 261 | # should also be removed ++ je ne sais pas dire en sed la ligne |
---|
| 262 | # suivant l'occurence de Last modification |
---|
[156] | 263 | cat << EOF > /tmp/css_modification |
---|
| 264 | p.preformat { |
---|
| 265 | font-family: Courier; |
---|
| 266 | } |
---|
| 267 | EOF |
---|
[168] | 268 | # count of directory levels in output |
---|
| 269 | # this ount will be use to format relative path later |
---|
| 270 | nblev1=$(echo ${output} | sed -e "s@/\$@@" |awk -F "/" '{print NF}') |
---|
| 271 | # |
---|
[111] | 272 | list_html=$(find ${output} -name "*.html") |
---|
[89] | 273 | for file_html in ${list_html} |
---|
| 274 | do |
---|
[183] | 275 | # build the .pro file name |
---|
[168] | 276 | bfile=$(basename ${file_html} .html) |
---|
| 277 | # retrieve the path of html file relative to memopwd (so relative to |
---|
| 278 | # output). This path will be used in "Source" link. |
---|
| 279 | nblev2=$(dirname ${file_html} | sed -e "s@/\$@@" | awk -F "/" '{print NF}') |
---|
| 280 | difflev=$((${nblev2} - ${nblev1})) |
---|
| 281 | if [ ${difflev} -ge 2 ] |
---|
| 282 | then |
---|
| 283 | ilev=1 |
---|
| 284 | reloutput_html=".." |
---|
| 285 | while [ ${ilev} -le ${difflev} ] |
---|
| 286 | do |
---|
| 287 | reloutput_html="${reloutput_html}/.." |
---|
| 288 | ilev=$(( ${ilev} + 1 )) |
---|
| 289 | done |
---|
| 290 | relpath_html=$(dirname ${file_html} | \ |
---|
| 291 | sed -e "s@${output}@${reloutput_html}@" \ |
---|
| 292 | -e "s@\$@/@") |
---|
| 293 | echo "relpath ${relpath_html})" |
---|
| 294 | else |
---|
| 295 | relpath_html="./" |
---|
| 296 | fi |
---|
| 297 | # echo "relpath ${relpath_html}/${bfile}" |
---|
[89] | 298 | sed \ |
---|
[188] | 299 | -e "s@<td >Source<\/td>@<td><a href=\"${relpath_html}/${bfile}.pro\" title=\"Source code of a file\">Source<\/a><\/td>@" \ |
---|
[89] | 300 | -e "s/\(Generated by IDLdoc 2.0\)\( on .*\)\( -->\)/\1\3/" \ |
---|
| 301 | -e "s/\(Produced by IDLdoc 2.0\)\( on .*\)\(\.<\/div>\)/\1\3/" \ |
---|
| 302 | -e "/<h2>Produced on/d" \ |
---|
| 303 | -e "/Last modification:/d" \ |
---|
| 304 | -e "/<dd>... ... .* ..:..:.. ....<\/dd>/d" \ |
---|
[123] | 305 | -e 's@<div class="value">@<div class="preformat">@' \ |
---|
[135] | 306 | -e 's/div\#file_comments {/div\#file_comments { white-space: pre;/' \ |
---|
[163] | 307 | -e 's@^ <fixe>@<p class="preformat">@' \ |
---|
| 308 | -e 's@^ </fixe>@</p>@' \ |
---|
[156] | 309 | -e '/Main styles/r /tmp/css_modification' \ |
---|
[89] | 310 | ${file_html} > ${file_html}_modify |
---|
| 311 | mv ${file_html}_modify ${file_html} |
---|
| 312 | done |
---|
[156] | 313 | rm /tmp/css_modification |
---|
[111] | 314 | # suppress ".html" in idldoc-index*.html in lines like |
---|
| 315 | # a parameter from the routine ./ReadWrite/idl-NetCDF/ncdf_read.html |
---|
| 316 | list_html=$(find ${output} -name "idldoc-index*.html") |
---|
| 317 | for file_html in ${list_html} |
---|
| 318 | do |
---|
| 319 | sed \ |
---|
| 320 | -e "s/\(a parameter from the routine \)\(.*\)\(.html\)/\1\2/" \ |
---|
| 321 | ${file_html} > ${file_html}_modify |
---|
| 322 | mv ${file_html}_modify ${file_html} |
---|
| 323 | done |
---|
| 324 | echo "iii : you can see log file in ${log}" |
---|
| 325 | echo "iii : and look ${output}/idldoc-warnings.html#undoc" |
---|
[86] | 326 | # |
---|
[163] | 327 | # build a idl file to launch idldoc |
---|
| 328 | output=../idldoc_assistant_output/ |
---|
| 329 | log="/tmp/idldocassistant_${$}.log" |
---|
| 330 | pro="/tmp/idldocassistant_${$}.pro" |
---|
| 331 | cat <<EOF > ${pro} |
---|
| 332 | !path = expand_path('+' + '../idldoc/') |
---|
| 333 | print,!path |
---|
| 334 | idldoc,root="../../",title="SAXO Documentation Assistant", $ |
---|
| 335 | LOG_FILE="${log}", $ |
---|
| 336 | output="${output}", overview='../../overview', /statistics, /preformat, /embed, /assistant |
---|
| 337 | exit |
---|
| 338 | EOF |
---|
| 339 | # launch idl with the file built above |
---|
| 340 | IDL_STARTUP=${pro};${IDL_DIR}/bin/idl |
---|
| 341 | /bin/rm ${pro} |
---|
| 342 | # In order to do not have to many revision in svn, we modify some |
---|
| 343 | # lines produced by idldoc : |
---|
| 344 | # examples : |
---|
| 345 | # <!-- Generated by IDLdoc 2.0 on Wed Jun 7 10:25:28 2006 --> |
---|
| 346 | # will be replaced by |
---|
| 347 | # <!-- Generated by IDLdoc 2.0 --> |
---|
[187] | 348 | # <p><font color="gray" size="-3"> Produced by IDLdoc 2.0 on Wed Sep 13 16:32:10 2006.</font></p> |
---|
[163] | 349 | # will be replaced by |
---|
[187] | 350 | # <p><font color="gray" size="-3"> Produced by IDLdoc 2.0</font></p> |
---|
[163] | 351 | # <h2>Produced on Wed Jun 7 10:23:13 2006</h2> |
---|
[186] | 352 | # will be delete |
---|
| 353 | # other lines will be deleted because the time is the time of checkout not |
---|
[163] | 354 | # the time of revision. |
---|
| 355 | # the sequence of lines |
---|
| 356 | #<dl> |
---|
| 357 | # <dt>Last modification:</dt> |
---|
| 358 | # <dd>Fri Jun 2 11:46:24 2006</dd> |
---|
| 359 | # </dl> |
---|
| 360 | # should also be removed ++ je ne sais pas dire en sed la ligne |
---|
| 361 | # suivant l'occurence de Last modification |
---|
| 362 | # replace *_param_* in href attributes because anchors are badly written |
---|
| 363 | # with _keyword_ |
---|
| 364 | #++ -e 's@\(href="#_.*\)\(_param_\)\(.*"\)@\1_keyword_\3@g' \ # ++ pb global |
---|
| 365 | # ONLINE_HELP, book="../idldoc_assistant_output/idldoc-lib.adp", /full_path # won't work |
---|
| 366 | list_html=$(find ${output} -name "*.html") |
---|
| 367 | for file_html in ${list_html} |
---|
| 368 | do |
---|
| 369 | sed \ |
---|
| 370 | -e "s/\(Generated by IDLdoc 2.0\)\( on .*\)\( -->\)/\1\3/" \ |
---|
[187] | 371 | -e "s/\(Produced by IDLdoc 2.0\)\( on .*\)\(\.<\/font>\)/\1\3/" \ |
---|
[163] | 372 | -e "/<h2>Produced on/d" \ |
---|
| 373 | -e "/Last modification:/d" \ |
---|
| 374 | -e "/<dd>... ... .* ..:..:.. ....<\/dd>/d" \ |
---|
| 375 | -e '/href/s@_param_@_keyword_@g' \ |
---|
| 376 | -e 's@<div class="value">@<div class="preformat">@' \ |
---|
| 377 | -e 's/div\#file_comments {/div\#file_comments { white-space: pre;/' \ |
---|
| 378 | -e 's@^ <fixe>@<pre style="font-family: Courier;">@' \ |
---|
| 379 | -e 's@^ </fixe>@</pre>@' \ |
---|
| 380 | ${file_html} > ${file_html}_modify |
---|
| 381 | mv ${file_html}_modify ${file_html} |
---|
| 382 | done |
---|
[176] | 383 | # add the directory-overview.html from dir-files.html in idldoc_html_output |
---|
| 384 | list_html=$(find ../idldoc_html_output -name dir-files.html) |
---|
| 385 | for file_html in ${list_html} |
---|
| 386 | do |
---|
| 387 | fout=../idldoc_assistant_output/${file_html#../idldoc_html_output/*} |
---|
[186] | 388 | fout=${fout%/*}/directory-overview.html |
---|
[188] | 389 | cp ${file_html} ${fout} |
---|
[176] | 390 | done |
---|
[163] | 391 | echo "iii : you can see log file in ${log}" |
---|
| 392 | echo "iii : and look ${output}/idldoc-warnings.html#undoc" |
---|
[86] | 393 | fi |
---|
[88] | 394 | #------------------------------------------------------------------ |
---|
| 395 | if [ ${doTARsrc} -eq 1 ] |
---|
[86] | 396 | then |
---|
| 397 | localtarbase=/tmp/savesaxo_${$} |
---|
| 398 | mkdir ${localtarbase}/ |
---|
[87] | 399 | # clean backup files : *~ |
---|
[88] | 400 | find ${memopwd}/../../.. -name "*~" -exec rm {} \; |
---|
[87] | 401 | # prepare the source tar (without the svn...) |
---|
[86] | 402 | # |
---|
[87] | 403 | cd ${memopwd}/../../.. |
---|
[179] | 404 | tar czf ${localtarbase}/SAXO_SRC_${ndate}r${rev}.tar.gz --exclude .svn SRC |
---|
[86] | 405 | # |
---|
[87] | 406 | # informations |
---|
[89] | 407 | echo "iii : following file may be copied on http://forge.ipsl.jussieu.fr/saxo/download/" |
---|
[87] | 408 | ls -l ${localtarbase} |
---|
| 409 | fi |
---|
[88] | 410 | #------------------------------------------------------------------ |
---|
| 411 | if [ ${doTARdata} -eq 1 ] |
---|
[87] | 412 | then |
---|
| 413 | localtarbase=/tmp/savesaxo_${$} |
---|
| 414 | mkdir ${localtarbase}/ |
---|
[86] | 415 | # |
---|
[87] | 416 | # prepare the data tar (without the svn...) |
---|
| 417 | # |
---|
| 418 | cd ${memopwd}/../../.. |
---|
| 419 | tar czf ${localtarbase}/SAXO_DATA_${ndate}.tar.gz --exclude .svn DATA |
---|
| 420 | # |
---|
[86] | 421 | # informations |
---|
[89] | 422 | echo "iii : following file may be copied on http://forge.ipsl.jussieu.fr/saxo/download/" |
---|
[86] | 423 | ls -l ${localtarbase} |
---|
| 424 | fi |
---|
[88] | 425 | #------------------------------------------------------------------ |
---|
[86] | 426 | if [ ${doforge} -eq 1 ] |
---|
| 427 | then |
---|
[100] | 428 | echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd two times" |
---|
[88] | 429 | if [ ${doTARsrc} -ne 1 ] |
---|
[86] | 430 | then |
---|
[89] | 431 | localtarbase=${1} |
---|
[86] | 432 | fi |
---|
[100] | 433 | scp ${localtarbase}/SAXO_*.tar.gz ${lgforge}@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/ |
---|
[86] | 434 | echo "iii : do not forget to update getsaxo.html" |
---|
| 435 | echo "iii : \$ ./makehtml.sh getsaxo" |
---|
| 436 | echo "iii : do not forget to clean ${localtarbase}" |
---|
| 437 | fi |
---|
[88] | 438 | #------------------------------------------------------------------ |
---|
[100] | 439 | if [[ ($doDTAlodyc -eq 1) || ($doDTAipsl -eq 1) ]] |
---|
[88] | 440 | then |
---|
[100] | 441 | echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd" |
---|
| 442 | infodata=$(ssh ${lgforge}@forge.ipsl.jussieu.fr ls -lht /ipsl/forge/projets/saxo/download/SAXO_DATA_*.tar.gz | head -n 1) |
---|
| 443 | filedata=$(echo ${infodata} | awk '{print $NF}') |
---|
| 444 | filedata=$(basename $filedata) |
---|
[88] | 445 | cat <<EOF > job_data_$$ |
---|
[100] | 446 | #!/bin/bash |
---|
[88] | 447 | cd SAXO_DIR |
---|
[86] | 448 | # |
---|
[88] | 449 | rm -rf DATA |
---|
| 450 | wget http://forge.ipsl.jussieu.fr/saxo/download/$filedata |
---|
[114] | 451 | gunzip $filedata |
---|
| 452 | tar vxf $( basename $filedata .gz ) |
---|
| 453 | rm -f $( basename $filedata .gz ) |
---|
[88] | 454 | # |
---|
| 455 | chmod -R 755 * |
---|
| 456 | exit |
---|
| 457 | # |
---|
[86] | 458 | EOF |
---|
[88] | 459 | fi |
---|
| 460 | #------------------------------------------------------------------ |
---|
| 461 | if [ $doSRClodyc -eq 1 ] |
---|
| 462 | then |
---|
| 463 | # update src on cerbere |
---|
[86] | 464 | # |
---|
[100] | 465 | echo "iii : update src on cerbere" |
---|
[115] | 466 | ssh smasson@cerbere.lodyc.jussieu.fr "svn update SAXO_DIR/SRC ; chmod -R 755 SAXO_DIR" |
---|
[88] | 467 | fi |
---|
| 468 | #------------------------------------------------------------------ |
---|
| 469 | if [ $doDTAlodyc -eq 1 ] |
---|
| 470 | then |
---|
| 471 | # update data on cerbere |
---|
| 472 | echo "iii : update data on cerbere" |
---|
| 473 | scp job_data_$$ smasson@cerbere.lodyc.jussieu.fr:. |
---|
| 474 | ssh smasson@cerbere.lodyc.jussieu.fr "chmod 755 job_data_$$ ; ./job_data_$$ ; rm -f job_data_$$" |
---|
| 475 | fi |
---|
| 476 | #------------------------------------------------------------------ |
---|
[100] | 477 | if [ $doSRCipsl -eq 1 ] |
---|
| 478 | then |
---|
[116] | 479 | # update src on calcul2 |
---|
[100] | 480 | # |
---|
[116] | 481 | echo "iii : update src on calcul2" |
---|
| 482 | ssh smlod@calcul2.ipsl.jussieu.fr "svn update SAXO_DIR/SRC ; chmod -R 755 SAXO_DIR" |
---|
[100] | 483 | fi |
---|
| 484 | #------------------------------------------------------------------ |
---|
| 485 | if [ $doDTAipsl -eq 1 ] |
---|
| 486 | then |
---|
| 487 | # update data on cook |
---|
| 488 | echo "iii : update data on cook" |
---|
| 489 | scp job_data_$$ smlod@cook.ipsl.jussieu.fr:. |
---|
| 490 | ssh smlod@cook.ipsl.jussieu.fr "chmod 755 job_data_$$ ; ./job_data_$$ ; rm -f job_data_$$" |
---|
| 491 | fi |
---|
| 492 | #------------------------------------------------------------------ |
---|
[88] | 493 | if [ $doSRCidris -eq 1 ] |
---|
| 494 | then |
---|
| 495 | # update src on rhodes |
---|
| 496 | echo "iii : update src to rhodes" |
---|
[115] | 497 | ssh reee217@rhodes.idris.fr "/usr/local/pub/svn/svn-1.3.1/bin/svn update SAXO_DIR/SRC ; chmod -R 755 SAXO_DIR" |
---|
[88] | 498 | fi |
---|
| 499 | #------------------------------------------------------------------ |
---|
| 500 | if [ $doDTAidris -eq 1 ] |
---|
| 501 | then |
---|
[100] | 502 | # create the update script for rhodes |
---|
| 503 | if [[ ($doDTAlodyc -eq 0) && ($doDTAipsl -eq 0) ]] |
---|
| 504 | then |
---|
| 505 | echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd" |
---|
| 506 | infodata=$(ssh ${lgforge}@forge.ipsl.jussieu.fr ls -lht /ipsl/forge/projets/saxo/download/SAXO_DATA_*.tar.gz | head -n 1) |
---|
| 507 | filedata=$(echo ${infodata} | awk '{print $NF}') |
---|
| 508 | filedata=$(basename $filedata) |
---|
| 509 | fi |
---|
| 510 | cat <<EOF > job_data_idris_$$ |
---|
| 511 | #!/bin/ksh |
---|
| 512 | cd SAXO_DIR |
---|
| 513 | # |
---|
| 514 | rm -rf DATA |
---|
| 515 | echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd" |
---|
| 516 | scp ${lgforge}@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/$filedata . |
---|
| 517 | gunzip $filedata |
---|
| 518 | tar vxf $( basename $filedata .gz ) |
---|
| 519 | rm -f $( basename $filedata .gz ) |
---|
| 520 | # |
---|
| 521 | chmod -R 755 * |
---|
| 522 | exit |
---|
| 523 | # |
---|
| 524 | EOF |
---|
[88] | 525 | # update data on gaya |
---|
| 526 | echo "iii : update data to gaya" |
---|
[100] | 527 | scp job_data_idris_$$ reee217@gaya.idris.fr:. |
---|
| 528 | ssh reee217@gaya.idris.fr "chmod 755 job_data_idris_$$ ; ./job_data_idris_$$ ; rm -f job_data_idris_$$" |
---|
[88] | 529 | fi |
---|
| 530 | #------------------------------------------------------------------ |
---|
[188] | 531 | if [ ${dodocdownload} -eq 1 ] |
---|
| 532 | then |
---|
| 533 | # ++ on pourrait peut-etre faire un rsync en enlevant les .sh et le .xsl |
---|
| 534 | # ++ les .sh et le .xsl sont pour l'instant encore là |
---|
| 535 | echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd several times" |
---|
| 536 | # |
---|
| 537 | # copy files in a temporary directory |
---|
| 538 | mkdir /tmp/download_${$}/ |
---|
| 539 | cp -rp ../xmldoc/ /tmp/download_${$}/ |
---|
| 540 | cp -rp ../idldoc_html_output /tmp/download_${$}/ |
---|
| 541 | # |
---|
| 542 | # remove svn files |
---|
| 543 | find /tmp/download_${$}/ -name ".svn" -exec rm -rf {} \; |
---|
| 544 | # |
---|
| 545 | # replace "../../" by http://forge.ipsl.jussieu.fr/saxo/browser/trunk/SRC/ |
---|
| 546 | # on ulink lines containing ../../ToBeReviewed/ and ../../Test/ |
---|
| 547 | list_html=$(find /tmp/download_${$}/ -name "*.html") |
---|
| 548 | for file_html in ${list_html} |
---|
| 549 | do |
---|
| 550 | sed -e "/..\/..\/ToBeReviewed/s+../../+http://forge.ipsl.jussieu.fr/saxo/browser/trunk/SRC/+" ${file_html} > ${file_html}_${$} |
---|
| 551 | mv ${file_html}_${$} ${file_html} |
---|
| 552 | sed -e "/..\/..\/Test/s+../../+http://forge.ipsl.jussieu.fr/saxo/browser/trunk/SRC/+" ${file_html} > ${file_html}_${$} |
---|
| 553 | mv ${file_html}_${$} ${file_html} |
---|
| 554 | done |
---|
| 555 | #++scp -rp /tmp/download_${$}/xmldoc/ ${lgforge}@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/ |
---|
| 556 | scp -rp /tmp/download_${$}/* ${lgforge}@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/ |
---|
| 557 | rm -rf /tmp/download_${$}/ |
---|
| 558 | fi |
---|
| 559 | #------------------------------------------------------------------ |
---|
| 560 | #------------------------------------------------------------------ |
---|
[86] | 561 | # |
---|
[88] | 562 | [ -f job_src_$$ ] && rm -f job_src_$$ |
---|
[100] | 563 | [ -f job_data_$$ ] && rm -f job_data_$$ |
---|
| 564 | [ -f job_data_idris_$$ ] && rm -f job_data_idris_$$ |
---|
[86] | 565 | # |
---|
[88] | 566 | exit |
---|
[86] | 567 | # |
---|