Changeset 233 for trunk/SRC/Documentation/xmldoc/savesaxo.sh
- Timestamp:
- 03/20/07 18:04:40 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Documentation/xmldoc/savesaxo.sh
r217 r233 3 3 # update : 4 4 # $Id$ 5 # fplod 2007-03-20T15:10:29Z aedon.locean-ipsl.upmc.fr (Darwin) 6 # . replace <pro>ginette</pro> by a sequence like 7 # <a href="./ginette.html">ginette</a> in idldoc html and assistant outputs 8 # . encaspulate example content in <pre> </pre> in idldoc assistant outputs 5 9 # smasson Fri Sep 22 17:28:10 CEST 2006 6 10 # check that the number of existing html files for each .pro file is 2! … … 19 23 # suppress ?format=raw 20 24 # fplod 2006-09-20T15:30:15Z aedon.locean-ipsl.upmc.fr (Darwin) 21 # add copy of html files unedr xmldoc and idldoc_ht lm_output on25 # add copy of html files unedr xmldoc and idldoc_html_output on 22 26 # saxo@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/ 23 27 # see dodocdownload … … 163 167 do 164 168 # does it contains pro or function ? 165 egrep -iq '^ * *(pro|function)' $ i166 if [ $ ?-eq 0 ]169 egrep -iq '^ * *(pro|function)' ${i} 170 if [ ${?} -eq 0 ] 167 171 then 168 echo "print, '$( basename $ i.pro ) :'" >> /tmp/compileall${$}.pro169 echo "resolve_all, resolve_either = '$( basename $ i.pro )', skip_routines = ['xxx2ps','trends', 'label_gmt']" >> /tmp/compileall${$}.pro172 echo "print, '$( basename ${i} .pro ) :'" >> /tmp/compileall${$}.pro 173 echo "resolve_all, resolve_either = '$( basename ${i} .pro )', skip_routines = ['xxx2ps','trends', 'label_gmt']" >> /tmp/compileall${$}.pro 170 174 fi 171 175 done … … 233 237 # build a idl file to launch idldoc 234 238 output=../idldoc_html_output/ 235 log="/tmp/idldocht lm_${$}.log"236 pro="/tmp/idldocht lm_${$}.pro"239 log="/tmp/idldochtml_${$}.log" 240 pro="/tmp/idldochtml_${$}.pro" 237 241 cat <<EOF > ${pro} 238 242 !path = expand_path('+' + '../idldoc/') … … 276 280 # 277 281 # count of directory levels in output 278 # this ount will be use to format relative path later282 # this count will be use to format relative path later 279 283 nblev1=$(echo ${output} | sed -e "s@/\$@@" |awk -F "/" '{print NF}') 280 284 # 281 list_html_pro=$(find ${output} -name "*.html" -exec grep 285 list_html_pro=$(find ${output} -name "*.html" -exec grep -l "<title>.*\.pro" {} \;) 282 286 for file_html in ${list_html_pro} 283 287 do … … 300 304 sed -e "s@${output}@${reloutput_html}@" \ 301 305 -e "s@\$@/@") 302 echo "relpath ${relpath_html})"306 # echo "relpath ${relpath_html})" 303 307 else 304 308 relpath_html="./" … … 337 341 mv ${file_html}_modify ${file_html} 338 342 done 343 # replace <pro>ginette</pro> by a sequence like 344 # <a href="./ginette.html">ginette</a> 345 ./pro2href.sh ${output} 346 status=${?} 347 if [ ${status} -ne 0 ] 348 then 349 echo "eee : pb during ./pro2href.sh" 350 exit 1 351 fi 339 352 echo "iii : you can see log file in ${log}" 340 353 echo "iii : and look ${output}/idldoc-warnings.html#undoc" … … 379 392 #++ -e 's@\(href="#_.*\)\(_param_\)\(.*"\)@\1_keyword_\3@g' \ # ++ pb global 380 393 # ONLINE_HELP, book="../idldoc_assistant_output/idldoc-lib.adp", /full_path # won't work 394 # encaspulate example content in <pre> </pre> in idldoc assistant outputs 395 # Examples section is supposed to start with <h3>Examples</h3> 396 # and end is before <h3>Version history</h3> 381 397 list_html=$(find ${output} -name "*.html") 382 398 for file_html in ${list_html} … … 393 409 -e 's@^ <fixe>@<pre>@' \ 394 410 -e 's@^ </fixe>@</pre>@' \ 411 -e "s@<h3>Examples</h3>@<h3>Examples</h3><pre>@" \ 412 -e "s@<h3>Version history</h3>@</pre><h3>Version history</h3>@" \ 395 413 ${file_html} > ${file_html}_modify 396 414 mv ${file_html}_modify ${file_html} 397 415 done 416 # replace <pro>ginette</pro> by a sequence like 417 # <a href="./ginette.html">ginette</a> 418 ./pro2href.sh ${output} 419 status=0 420 status=${?} 421 if [ ${status} -ne 0 ] 422 then 423 echo "eee : pb during ./pro2href.sh" 424 exit 1 425 fi 398 426 # add the directory-overview.html from dir-files.html in idldoc_html_output 399 427 list_html=$(find ../idldoc_html_output -name dir-files.html) … … 418 446 # check that the number of existing html files for each .pro file is 2! 419 447 for i in $( find ../.. -name "*.pro" ) 420 421 nhtml=$( find ../.. -name $( basename $ i.pro ).html | wc -l )422 if [ $ nhtml-ne 2 ]448 do 449 nhtml=$( find ../.. -name $( basename ${i} .pro ).html | wc -l ) 450 if [ ${nhtml} -ne 2 ] 423 451 then 424 echo ERROR there is not 2 $( basename $ i .pro ).html files425 find ../.. -name $( basename $ i.pro ).html452 echo ERROR there is not 2 $( basename ${i} .pro ).html files 453 find ../.. -name $( basename ${i} .pro ).html 426 454 echo 427 455 fi … … 473 501 fi 474 502 #------------------------------------------------------------------ 475 if [[ ($ doDTAlodyc -eq 1) || ($doDTAipsl-eq 1) ]]503 if [[ (${doDTAlodyc} -eq 1) || (${doDTAipsl} -eq 1) ]] 476 504 then 477 505 echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd" 478 506 infodata=$(ssh ${lgforge}@forge.ipsl.jussieu.fr ls -lht /ipsl/forge/projets/saxo/download/SAXO_DATA_*.tar.gz | head -n 1) 479 507 filedata=$(echo ${infodata} | awk '{print $NF}') 480 filedata=$(basename $ filedata)508 filedata=$(basename ${filedata}) 481 509 cat <<EOF > job_data_$$ 482 510 #!/bin/bash … … 484 512 # 485 513 rm -rf DATA 486 wget http://forge.ipsl.jussieu.fr/saxo/download/$ filedata487 gunzip $ filedata488 tar vxf $( basename $ filedata.gz )489 rm -f $( basename $ filedata.gz )514 wget http://forge.ipsl.jussieu.fr/saxo/download/${filedata} 515 gunzip ${filedata} 516 tar vxf $( basename ${filedata} .gz ) 517 rm -f $( basename ${filedata} .gz ) 490 518 # 491 519 chmod -R 755 * … … 495 523 fi 496 524 #------------------------------------------------------------------ 497 if [ $ doSRClodyc-eq 1 ]525 if [ ${doSRClodyc} -eq 1 ] 498 526 then 499 527 # update src on cerbere … … 503 531 fi 504 532 #------------------------------------------------------------------ 505 if [ $ doDTAlodyc-eq 1 ]533 if [ ${doDTAlodyc} -eq 1 ] 506 534 then 507 535 # update data on cerbere … … 511 539 fi 512 540 #------------------------------------------------------------------ 513 if [ $ doSRCipsl-eq 1 ]541 if [ ${doSRCipsl} -eq 1 ] 514 542 then 515 543 # update src on calcul2 … … 519 547 fi 520 548 #------------------------------------------------------------------ 521 if [ $ doDTAipsl-eq 1 ]549 if [ ${doDTAipsl} -eq 1 ] 522 550 then 523 551 # update data on cook … … 527 555 fi 528 556 #------------------------------------------------------------------ 529 if [ $ doSRCidris-eq 1 ]557 if [ ${doSRCidris} -eq 1 ] 530 558 then 531 559 # update src on rhodes … … 534 562 fi 535 563 #------------------------------------------------------------------ 536 if [ $ doDTAidris-eq 1 ]564 if [ ${doDTAidris} -eq 1 ] 537 565 then 538 566 # create the update script for rhodes 539 if [[ ($ doDTAlodyc -eq 0) && ($doDTAipsl-eq 0) ]]567 if [[ (${doDTAlodyc} -eq 0) && (${doDTAipsl} -eq 0) ]] 540 568 then 541 569 echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd" 542 570 infodata=$(ssh ${lgforge}@forge.ipsl.jussieu.fr ls -lht /ipsl/forge/projets/saxo/download/SAXO_DATA_*.tar.gz | head -n 1) 543 571 filedata=$(echo ${infodata} | awk '{print $NF}') 544 filedata=$(basename $ filedata)572 filedata=$(basename ${filedata}) 545 573 fi 546 574 cat <<EOF > job_data_idris_$$ … … 550 578 rm -rf DATA 551 579 echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd" 552 scp ${lgforge}@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/$ filedata.553 gunzip $ filedata554 tar vxf $( basename $ filedata.gz )555 rm -f $( basename $ filedata.gz )580 scp ${lgforge}@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/${filedata} . 581 gunzip ${filedata} 582 tar vxf $( basename ${filedata} .gz ) 583 rm -f $( basename ${filedata} .gz ) 556 584 # 557 585 chmod -R 755 *
Note: See TracChangeset
for help on using the changeset viewer.