source: trunk/SRC/Documentation/xmldoc/savesaxo.sh @ 413

Last change on this file since 413 was 413, checked in by pinsard, 15 years ago

doidldoc.sh ok for HTML

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