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