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