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

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

documentations tools improvements

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 20.7 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 20091112T101551Z zeus.locean-ipsl.upmc.fr (Linux)
15#
16#   * add check on doidldoc.sh status
17#
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#
23# fplod 2008-04-28T08:40:23Z aedon.locean-ipsl.upmc.fr (Darwin)
24# add wiki update
25# fplod 2008-04-16T12:23:44Z aedon.locean-ipsl.upmc.fr (Darwin)
26# add wiki production
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
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>
33# fplod 2007-06-26T14:33:12Z aedon.locean-ipsl.upmc.fr (Darwin)
34# copy listings.css in idldoc_assistant_output
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
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!
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
50# fplod 2006-09-21T13:05:32Z aedon.locean-ipsl.upmc.fr (Darwin)
51# add an svn id in idldoc-lib.adb after </profile>
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)
55# add copy of html files under xmldoc and idldoc_html_output on
56# saxo@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/
57# see dodocdownload
58# fplod 2006-09-20T11:05:23Z aedon.locean-ipsl.upmc.fr (Darwin)
59# correction to really suppress date in idldoc assistant outputs (font
60# instaed of div in html output)
61# fplod 2006-09-18T13:25:12Z aedon.locean-ipsl.upmc.fr (Darwin)
62# add status checking after makehtml.sh
63# smasson Fri Sep 15 10:42:01 CEST 2006
64# merge idldoc html and idldoc assistant
65# smasson Thu Sep 14 15:19:23 CEST 2006
66# add the revision number in the name of SAXO_SRC_*.tar.gz
67# smasson Wed Sep 13 14:18:02 CEST 2006
68# add the directory-overview.html from dir-files.html in idldoc_html_output
69# fplod 2006-09-07T08:09:47Z aedon.locean-ipsl.upmc.fr (Darwin)
70# main is rename to websaxo
71# fplod 2006-09-05T15:39:47Z aedon.locean-ipsl.upmc.fr (Darwin)
72# add Source link in idldoc html outpout
73# snlod/fplod 2006-08-25T08:30:36Z electre.locean-ipsl.upmc.fr (Darwin)
74# add for idldoc assistant
75# fplod 2006-08-17T09:19:06Z aedon.locean-ipsl.upmc.fr (Darwin)
76# add transformation after idldoc to force non-proportional font
77# on bloc delimited by
78#  <fixe>
79#  </fixe>
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
84# fplod 2006-07-21T08:23:52Z aedon.locean-ipsl.upmc.fr (Darwin)
85# add mini_notice production
86# fplod 2006-07-11T08:26:05Z aedon.locean-ipsl.upmc.fr (Darwin)
87# commented tidy in dohtml section is moved in makehtml
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
90# fplod 2006-07-04T13:09:19Z aedon.locean-ipsl.upmc.fr (Darwin)
91# for idldoc html output
92# because preformat option doesn't seem to work well
93# replace
94# div class="value"
95# by
96# div class="preformat"
97# fplod 2006-06-19T08:46:39Z aedon.locean-ipsl.upmc.fr (Darwin)
98# for idldoc html output
99#. replace
100#     -e 's/\(href=".*\)\(\.html\)\("\)/\1\2?format=raw\3/g' \
101#     -e 's/\(href=".*\)\(\.html\)\(#.*"\)/\1\2?format=raw\3/g' \
102#     -e 's/\(src=".*\)\(\.html\)\("\)/\1\2?format=raw\3/g' \
103# by
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
108# . suppress .html in line like
109# a parameter from the routine ./ReadWrite/idl-NetCDF/ncdf_read.html
110# in files idldoc-index*.html
111# fplod 2006-06-14T12:41:37Z aedon.locean-ipsl.upmc.fr (Darwin)
112# add embed parameter idldoc instructions to try to fix ticket#17
113# fplod 2006-06-07T12:11:50Z aedon.locean-ipsl.upmc.fr (Darwin)
114# add g option in ?format=raw sed transformation in order to fix
115# link on top of idldoc like directory-overview.html
116# fplod 2006-06-07T10:57:35Z aedon.locean-ipsl.upmc.fr (Darwin)
117# add ?format=raw in idldoc production for frames
118# fplod 2006-06-07T08:14:15Z aedon.locean-ipsl.upmc.fr (Darwin)
119# add action for idldochtml
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
125set -x
126set -u
127#
128# define idl_dir
129# reference is idl 64 on zeus.locean-ipsl.upmc.fr
130idl_dir=/usr/local_linux/idl/idl_6.4/idl/
131#
132docompileall=0
133dohtml=0
134dowiki=0
135dooldtest=0
136doidlwavedoc=0
137doidldoc=1
138doTARsrc=0
139doTARdata=0
140doforge=0
141doSRClocean=0
142doDTAlocean=0
143doSRCipsl=0
144doDTAipsl=0
145doSRCidris=0
146doDTAidris=0
147dodocdownload=0
148dowikiupdate=0
149#
150case $( whoami ) in
151    smasson)
152        lgforge=smasson
153    ;;
154    floseb)
155        lgforge=smasson
156    ;;
157    *)
158        lgforge=saxo
159    ;;
160esac
161#
162if [ ${lgforge} != smasson ]
163then
164    doSRClocean=0
165    doDTAlocean=0
166    doSRCipsl=0
167    doDTAipsl=0
168    doSRCidris=0
169    doDTAidris=0
170fi
171#
172# get the date in a nice format
173#
174ndate=`date +%Y%m%d`
175rev=$( svn info | grep -i revision | awk '{print $NF}' )
176# memorize current directory
177memopwd=$(pwd) # should be <working space>/SRC/Documentation/xmldoc
178#
179#------------------------------------------------------------------
180if [ ${docompileall} -eq 1 ]
181    then
182    cat <<EOF > /tmp/compileall${$}.pro
183.reset_session
184;
185!path = expand_path('+' + '../..') + ':' + expand_path('+' + !dir)
186resolve_all, resolve_either='def_myuniquetmpdir', skip_routines = ['xxx2ps','trends', 'label_gmt']
187resolve_all, resolve_either = 'find', skip_routines = ['xxx2ps','trends', 'label_gmt']
188def_myuniquetmpdir
189oldcm = find('oldcm_empty')
190;oldcm = find('oldcm_full')
191oldcm = oldcm[0]
192@cm_general
193file_copy, oldcm, myuniquetmpdir + 'oldcm_used.pro', /overwrite
194!path = myuniquetmpdir + ':' + !path
195IF !journal NE 0 THEN journal
196journal, myuniquetmpdir + 'cm_demomode_used.pro'
197journal
198path_cache, /rebuild
199;
200resolve_all, resolve_either='keep_compatibility', skip_routines = ['xxx2ps','trends', 'label_gmt']
201;
202EOF
203#
204    for i in $( find ${memopwd}/../.. -name "*.pro" | grep -iv label_gmt  | grep -iv report )
205      do
206# does it contains pro or function ?
207      egrep -iq '^ *    *(pro|function)' ${i}
208      if [ ${?} -eq 0 ]
209          then
210          echo "print, '$( basename ${i} .pro ) :'" >> /tmp/compileall${$}.pro
211          echo "resolve_all, resolve_either = '$( basename ${i} .pro )', skip_routines = ['xxx2ps','trends', 'label_gmt', 'report']" >> /tmp/compileall${$}.pro
212      fi
213    done
214    echo "exit" >> /tmp/compileall${$}.pro
215    IDL_STARTUP=/tmp/compileall${$}.pro
216    ${idl_dir}/bin/idl &> /tmp/compileallerr_${$}
217    echo
218    echo
219    grep -i "error" /tmp/compileallerr_${$}
220#    grep -q "Compilation error(s)" /tmp/compileallerr_${$}
221    if [ ${?} -ne 0 ]
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_${$}"
228     more /tmp/compileallerr_${$}
229     exit 1
230    fi
231    echo
232    echo
233fi
234#------------------------------------------------------------------
235if [ ${dohtml} -eq 1 ]
236then
237#
238# redo the HTML files
239#
240    cd ${memopwd}
241    make clean
242    make html
243fi
244#------------------------------------------------------------------
245if [ ${dowiki} -eq 1 ]
246then
247#
248# redo the WIKI files
249#
250    cd ${memopwd}
251    make clean
252    make tracwiki
253fi
254#------------------------------------------------------------------
255if [ ${dooldtest} -eq 1 ]
256then
257# make the old test
258#
259    cd ${memopwd}/../../Tests/
260    ./makeold.sh
261    exit 0
262fi
263#------------------------------------------------------------------
264if  [ ${doidlwavedoc} -eq 1 ]
265then
266#
267# redo idlwave doc
268#
269    cd ${memopwd}/../..
270    Documentation/idlwave_catalog -v -f saxo
271    exit 0
272fi
273#------------------------------------------------------------------
274if  [ ${doidldoc} -eq 1 ]
275then
276    #
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}
282    doidldoc_html=${?}
283    if [ ${doidldoc_html} -ne 0 ]
284    then
285     echo "eee : pb with doidldoc html"
286     exit 1
287    fi
288    #
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/')
295print,!path
296idldoc,root="../../",title="SAXO Documentation Assistant", $
297LOG_FILE="${log}", $
298output="${output}", overview='../../overview', /statistics, /preformat, /embed, /assistant
299exit
300EOF
301    # launch idl with the file built above
302    IDL_STARTUP=${pro};${idl_dir}/bin/idl
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 -->
310    # <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0 on Wed Sep 13 16:32:10 2006.</font></p>
311    # will be replaced by
312    # <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0</font></p>
313    # <h2>Produced on Wed Jun  7 10:23:13 2006</h2>
314    # will be delete
315    # other lines will be deleted because the time is the time of checkout not
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
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>
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/" \
336     -e "s/\(Produced by IDLdoc 2.0\)\( on .*\)\(\.<\/font>\)/\1\3/" \
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;/' \
343     -e 's@^ <fixe>@<pre>@' \
344     -e 's@^ </fixe>@</pre>@' \
345     -e "s@<h3>Examples</h3>@<h3>Examples</h3><pre>@" \
346     -e "s@<h3>Version history</h3>@</pre><h3>Version history</h3>@" \
347     ${file_html} > ${file_html}_modify
348     mv ${file_html}_modify ${file_html}
349    done
350    # replace <pro>ginette</pro> by a sequence like
351    # <a href="./ginette.html">ginette</a>
352    ./pro2href.sh -i ${output} -r ${output} -e pro
353    status=${?}
354    if [ ${status} -ne 0 ]
355    then
356       echo "eee : pb during ./pro2href.sh for <pro>...</pro>"
357       exit 1
358    fi
359    # replace <proidl>ginette</proidl> by a sequence like
360    # <a href="./ginette.html">ginette</a>
361    ./pro2href.sh  -i ${output} -r ${idl_dir}/help/online_help -e proidl
362    status=${?}
363    if [ ${status} -ne 0 ]
364    then
365       echo "eee : pb during ./pro2href.sh for <proidl>...</proidl>"
366       exit 1
367    fi
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/*}
373      fout=${fout%/*}/directory-overview.html
374      cp ${file_html} ${fout}
375    done
376    # copy listings.css (needed by directory-overview.html files)
377    cp ../idldoc/resource/listings.css ${output}
378    # add an id in idldoc-lib.adp
379    cat << EOF > /tmp/adp_modification
380<!-- \$Id\$ -->
381EOF
382    sed -e "/<\/profile>/r /tmp/adp_modification" \
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
388    echo "iii : you can see log file in ${log}"
389    echo "iii : and look ${output}/idldoc-warnings.html#undoc"
390    # check that the number of existing html files for each .pro file is 2!
391    for i in $( find ../.. -name "*.pro" )
392    do
393      nhtml=$( find ../.. -name $( basename ${i} .pro ).html | wc -l )
394      if [ ${nhtml} -ne 2 ]
395          then
396          echo "ERROR there is no 2 $( basename ${i} .pro ).html files"
397          find ../.. -name $( basename ${i} .pro ).html
398          echo
399      fi
400    done
401fi
402#------------------------------------------------------------------
403if [ ${doTARsrc} -eq 1 ]
404then
405    localtarbase=/tmp/savesaxo_${$}
406    mkdir  ${localtarbase}/
407# clean backup files : *~
408    find ${memopwd}/../../.. -name "*~" -exec rm {} \;
409# prepare the source tar (without the svn...)
410#
411    cd ${memopwd}/../../..
412    tar czf ${localtarbase}/SAXO_SRC_${ndate}r${rev}.tar.gz --exclude .svn SRC
413#
414#   informations
415    echo "iii : following file may be copied on http://forge.ipsl.jussieu.fr/saxo/download/"
416    ls -l ${localtarbase}
417fi
418#------------------------------------------------------------------
419if [ ${doTARdata} -eq 1 ]
420then
421    localtarbase=/tmp/savesaxo_${$}
422    mkdir  ${localtarbase}/
423#
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#
429#   informations
430    echo "iii : following file may be copied on http://forge.ipsl.jussieu.fr/saxo/download/"
431    ls -l ${localtarbase}
432fi
433#------------------------------------------------------------------
434if [ ${doforge} -eq 1 ]
435then
436    echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd two times"
437    if [ ${doTARsrc} -ne 1 ]
438    then
439       localtarbase=${1}
440    fi
441    scp ${localtarbase}/SAXO_*.tar.gz ${lgforge}@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/
442    echo "iii : do not forget to update getsaxo.html"
443    echo "iii : \$ make ./getsaxo.html"
444    echo "iii : do not forget to clean ${localtarbase}"
445fi
446#------------------------------------------------------------------
447if [[ (${doDTAlocean} -eq 1) || (${doDTAipsl} -eq 1) ]]
448then
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}')
452    filedata=$(basename ${filedata})
453    cat <<EOF > job_data_$$
454#!/bin/bash
455cd SAXO_DIR
456#
457rm -rf DATA
458wget http://forge.ipsl.jussieu.fr/saxo/download/${filedata}
459gunzip ${filedata}
460tar vxf $( basename ${filedata} .gz )
461rm -f $( basename ${filedata} .gz )
462#
463chmod -R 755 *
464exit
465#
466EOF
467fi
468#------------------------------------------------------------------
469if [ ${doSRClocean} -eq 1 ]
470then
471# update src on cerbere
472#
473    echo "iii : update src on cerbere"
474    ssh smasson@cerbere.locean-ipsl.upmc.fr "svn update SAXO_DIR/SRC ; chmod -R 755 SAXO_DIR"
475fi
476#------------------------------------------------------------------
477if [ ${doDTAlocean} -eq 1 ]
478then
479# update data on cerbere
480    echo "iii : update data on cerbere"
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_$$"
483fi
484#------------------------------------------------------------------
485if [ ${doSRCipsl} -eq 1 ]
486then
487# update src on calcul2
488#
489    echo "iii : update src on calcul2"
490    ssh smlod@calcul2.ipsl.jussieu.fr "svn update SAXO_DIR/SRC ; chmod -R 755 SAXO_DIR"
491fi
492#------------------------------------------------------------------
493if [ ${doDTAipsl} -eq 1 ]
494then
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_$$"
499fi
500#------------------------------------------------------------------
501if [ ${doSRCidris} -eq 1 ]
502then
503# update src on rhodes
504    echo "iii : update src to rhodes"
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"
506fi
507#------------------------------------------------------------------
508if [ ${doDTAidris} -eq 1 ]
509then
510# create the update script for rhodes
511    if [[ (${doDTAlocean} -eq 0) && (${doDTAipsl} -eq 0) ]]
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}')
516        filedata=$(basename ${filedata})
517    fi
518    cat <<EOF > job_data_idris_$$
519#!/bin/ksh
520cd SAXO_DIR
521#
522rm -rf DATA
523echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd"
524scp ${lgforge}@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/${filedata} .
525gunzip ${filedata}
526tar vxf $( basename ${filedata} .gz )
527rm -f $( basename ${filedata} .gz )
528#
529chmod -R 755 *
530exit
531#
532EOF
533# update data on gaya
534    echo "iii : update data to gaya"
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_$$"
537fi
538#------------------------------------------------------------------
539if [ ${dodocdownload} -eq 1 ]
540then
541    # ++ on pourrait peut-etre faire un rsync en enlevant les .sh et le .xsl
542    # et faire le ménage des fichiers qui n'existent plus
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_${$}/
547    cp -rp ../xmldoc /tmp/download_${$}/
548    cp -rp ../idldoc_html_output /tmp/download_${$}/
549    #
550    # remove svn files
551    find /tmp/download_${$}/ -name ".svn" -exec rm -rf {} \;
552    #
553    # replace relative path
554    # by http://forge.ipsl.jussieu.fr/saxo/browser/trunk/SRC/
555    # on ulink lines containing some directories like ../../ToBeReviewed/ or ../../Test/ or file like newheader.txt
556    list_html=$(find /tmp/download_${$}/ -name "*.html")
557    for file_html in ${list_html}
558    do
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}
567    done
568    echo
569    echo "give SAXO password if asked"
570    scp -rp /tmp/download_${$}/* saxo@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/
571    rm -rf /tmp/download_${$}/
572fi
573#
574# update wiki pages
575if [ ${dowikiupdate} -eq 1 ]
576then
577    # uncomment this following line if you want to start from scratch
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
581    # uncomment this following line if you want to leave without any trace
582    # ssh saxo@forge.ipsl.jussieu.fr rm -rf /tmp/saxo
583fi
584#------------------------------------------------------------------
585#------------------------------------------------------------------
586#
587[ -f job_src_$$ ] && rm -f job_src_$$
588[ -f job_data_$$ ] && rm -f job_data_$$
589[ -f job_data_idris_$$ ] && rm -f job_data_idris_$$
590#
591exit
Note: See TracBrowser for help on using the repository browser.