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