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

Last change on this file since 188 was 188, checked in by pinsard, 18 years ago

remove format=raw in all html files 1/2

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