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