1 | #!/bin/bash -x |
---|
2 | # |
---|
3 | # |
---|
4 | # TODO |
---|
5 | # ==== |
---|
6 | # |
---|
7 | # use doidldoc.sh for assistant outputs |
---|
8 | # |
---|
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 | # |
---|
15 | # EVOLUTIONS |
---|
16 | # ========== |
---|
17 | # |
---|
18 | # $Id$ |
---|
19 | # |
---|
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 | # |
---|
25 | # already existing files have been removed manualy on |
---|
26 | # saxo@forge:~/download/xmldoc/ |
---|
27 | # |
---|
28 | # - fplod 20100125T112917Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
29 | # |
---|
30 | # * complete doidldoc.sh calling sequence |
---|
31 | # |
---|
32 | # - fplod 20091112T101551Z zeus.locean-ipsl.upmc.fr (Linux) |
---|
33 | # |
---|
34 | # * add check on doidldoc.sh status |
---|
35 | # |
---|
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 | # |
---|
41 | # fplod 2008-04-28T08:40:23Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
42 | # add wiki update |
---|
43 | # fplod 2008-04-16T12:23:44Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
44 | # add wiki production |
---|
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 |
---|
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> |
---|
51 | # fplod 2007-06-26T14:33:12Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
52 | # copy listings.css in idldoc_assistant_output |
---|
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 |
---|
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! |
---|
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 |
---|
68 | # fplod 2006-09-21T13:05:32Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
69 | # add an svn id in idldoc-lib.adb after </profile> |
---|
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) |
---|
73 | # add copy of html files under xmldoc and idldoc_html_output on |
---|
74 | # saxo@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/ |
---|
75 | # see dodocdownload |
---|
76 | # fplod 2006-09-20T11:05:23Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
77 | # correction to really suppress date in idldoc assistant outputs (font |
---|
78 | # instaed of div in html output) |
---|
79 | # fplod 2006-09-18T13:25:12Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
80 | # add status checking after makehtml.sh |
---|
81 | # smasson Fri Sep 15 10:42:01 CEST 2006 |
---|
82 | # merge idldoc html and idldoc assistant |
---|
83 | # smasson Thu Sep 14 15:19:23 CEST 2006 |
---|
84 | # add the revision number in the name of SAXO_SRC_*.tar.gz |
---|
85 | # smasson Wed Sep 13 14:18:02 CEST 2006 |
---|
86 | # add the directory-overview.html from dir-files.html in idldoc_html_output |
---|
87 | # fplod 2006-09-07T08:09:47Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
88 | # main is rename to websaxo |
---|
89 | # fplod 2006-09-05T15:39:47Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
90 | # add Source link in idldoc html outpout |
---|
91 | # snlod/fplod 2006-08-25T08:30:36Z electre.locean-ipsl.upmc.fr (Darwin) |
---|
92 | # add for idldoc assistant |
---|
93 | # fplod 2006-08-17T09:19:06Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
94 | # add transformation after idldoc to force non-proportional font |
---|
95 | # on bloc delimited by |
---|
96 | # <fixe> |
---|
97 | # </fixe> |
---|
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 |
---|
102 | # fplod 2006-07-21T08:23:52Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
103 | # add mini_notice production |
---|
104 | # fplod 2006-07-11T08:26:05Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
105 | # commented tidy in dohtml section is moved in makehtml |
---|
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 |
---|
108 | # fplod 2006-07-04T13:09:19Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
109 | # for idldoc html output |
---|
110 | # because preformat option doesn't seem to work well |
---|
111 | # replace |
---|
112 | # div class="value" |
---|
113 | # by |
---|
114 | # div class="preformat" |
---|
115 | # fplod 2006-06-19T08:46:39Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
116 | # for idldoc html output |
---|
117 | #. replace |
---|
118 | # -e 's/\(href=".*\)\(\.html\)\("\)/\1\2?format=raw\3/g' \ |
---|
119 | # -e 's/\(href=".*\)\(\.html\)\(#.*"\)/\1\2?format=raw\3/g' \ |
---|
120 | # -e 's/\(src=".*\)\(\.html\)\("\)/\1\2?format=raw\3/g' \ |
---|
121 | # by |
---|
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 |
---|
126 | # . suppress .html in line like |
---|
127 | # a parameter from the routine ./ReadWrite/idl-NetCDF/ncdf_read.html |
---|
128 | # in files idldoc-index*.html |
---|
129 | # fplod 2006-06-14T12:41:37Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
130 | # add embed parameter idldoc instructions to try to fix ticket#17 |
---|
131 | # fplod 2006-06-07T12:11:50Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
132 | # add g option in ?format=raw sed transformation in order to fix |
---|
133 | # link on top of idldoc like directory-overview.html |
---|
134 | # fplod 2006-06-07T10:57:35Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
135 | # add ?format=raw in idldoc production for frames |
---|
136 | # fplod 2006-06-07T08:14:15Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
137 | # add action for idldochtml |
---|
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 |
---|
143 | #set -x |
---|
144 | set -u |
---|
145 | # |
---|
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/ |
---|
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/ |
---|
153 | # |
---|
154 | docompileall=1 |
---|
155 | dohtml=0 |
---|
156 | dowiki=0 |
---|
157 | dooldtest=0 |
---|
158 | doidlwavedoc=0 |
---|
159 | doidldoc=0 |
---|
160 | doTARsrc=0 |
---|
161 | doTARdata=0 |
---|
162 | doforge=0 |
---|
163 | doSRClocean=0 |
---|
164 | doDTAlocean=0 |
---|
165 | doSRCipsl=0 |
---|
166 | doDTAipsl=0 |
---|
167 | doSRCidris=0 |
---|
168 | doDTAidris=0 |
---|
169 | dodocdownload=0 |
---|
170 | dowikiupdate=0 |
---|
171 | # |
---|
172 | case $( whoami ) in |
---|
173 | smasson) |
---|
174 | lgforge=smasson |
---|
175 | ;; |
---|
176 | floseb) |
---|
177 | lgforge=smasson |
---|
178 | ;; |
---|
179 | *) |
---|
180 | lgforge=saxo |
---|
181 | ;; |
---|
182 | esac |
---|
183 | # |
---|
184 | if [ ${lgforge} != smasson ] |
---|
185 | then |
---|
186 | doSRClocean=0 |
---|
187 | doDTAlocean=0 |
---|
188 | doSRCipsl=0 |
---|
189 | doDTAipsl=0 |
---|
190 | doSRCidris=0 |
---|
191 | doDTAidris=0 |
---|
192 | fi |
---|
193 | # |
---|
194 | # get the date in a nice format |
---|
195 | # |
---|
196 | ndate=`date +%Y%m%d` |
---|
197 | # memorize current directory |
---|
198 | # should be <working space>/SRC/Documentation/xmldoc |
---|
199 | memopwd=$(pwd) |
---|
200 | application="FL" |
---|
201 | # |
---|
202 | #------------------------------------------------------------------ |
---|
203 | if [ ${docompileall} -eq 1 ] |
---|
204 | then |
---|
205 | case ${application} in |
---|
206 | 'idl') |
---|
207 | cat << EOF > /tmp/compileall${$}.pro |
---|
208 | .reset_session |
---|
209 | ; |
---|
210 | !path = expand_path('+' + '../..') + ':' + expand_path('+' + !dir) |
---|
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'] |
---|
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 |
---|
219 | !path = myuniquetmpdir + ':' + !path |
---|
220 | IF !journal NE 0 THEN journal |
---|
221 | journal, myuniquetmpdir + 'cm_demomode_used.pro' |
---|
222 | journal |
---|
223 | path_cache, /rebuild |
---|
224 | ; |
---|
225 | resolve_all, resolve_either='keep_compatibility', skip_routines = ['xxx2ps','trends', 'label_gmt'] |
---|
226 | ; |
---|
227 | EOF |
---|
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 |
---|
257 | # |
---|
258 | for i in $( find ${memopwd}/../.. -name "*.pro" | grep -iv label_gmt | grep -iv report ) |
---|
259 | do |
---|
260 | # does it contains pro or function ? |
---|
261 | egrep -iq '^ * *(pro|function)' ${i} |
---|
262 | if [ ${?} -eq 0 ] |
---|
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 |
---|
266 | fi |
---|
267 | done |
---|
268 | echo "exit" >> /tmp/compileall${$}.pro |
---|
269 | IDL_STARTUP=/tmp/compileall${$}.pro |
---|
270 | #++ ${idl_dir}/bin/idl &> /tmp/compileallerr_${$} |
---|
271 | #++ ${idl_dir}/gdl &> /tmp/compileallerr_${$} |
---|
272 | ${idl_dir}/fl |
---|
273 | ${idl_dir}/fl &> /tmp/compileallerr_${$} |
---|
274 | |
---|
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 |
---|
291 | fi |
---|
292 | #------------------------------------------------------------------ |
---|
293 | if [ ${dohtml} -eq 1 ] |
---|
294 | then |
---|
295 | # |
---|
296 | # redo the HTML files |
---|
297 | # |
---|
298 | cd ${memopwd} |
---|
299 | make clean |
---|
300 | make html |
---|
301 | fi |
---|
302 | #------------------------------------------------------------------ |
---|
303 | if [ ${dowiki} -eq 1 ] |
---|
304 | then |
---|
305 | # |
---|
306 | # redo the WIKI files |
---|
307 | # |
---|
308 | cd ${memopwd} |
---|
309 | make clean |
---|
310 | make tracwiki |
---|
311 | fi |
---|
312 | #------------------------------------------------------------------ |
---|
313 | if [ ${dooldtest} -eq 1 ] |
---|
314 | then |
---|
315 | # make the old test |
---|
316 | # |
---|
317 | cd ${memopwd}/../../Tests/ |
---|
318 | ./makeold.sh |
---|
319 | exit 0 |
---|
320 | fi |
---|
321 | #------------------------------------------------------------------ |
---|
322 | if [ ${doidlwavedoc} -eq 1 ] |
---|
323 | then |
---|
324 | # |
---|
325 | # redo idlwave doc |
---|
326 | # |
---|
327 | cd ${memopwd}/../.. |
---|
328 | Documentation/idlwave_catalog -v -f saxo |
---|
329 | exit 0 |
---|
330 | fi |
---|
331 | #------------------------------------------------------------------ |
---|
332 | if [ ${doidldoc} -eq 1 ] |
---|
333 | then |
---|
334 | # |
---|
335 | # build HTML idldoc outputs |
---|
336 | ${SAXO_DIR}/SRC/Documentation/xmldoc/doidldoc.sh \ |
---|
337 | -i ../.. -t "SAXO Documentation" \ |
---|
338 | -o ../idldoc_html_output/ |
---|
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} |
---|
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 |
---|
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 |
---|
440 | <!-- \$Id\$ --> |
---|
441 | EOF |
---|
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 |
---|
461 | fi |
---|
462 | #------------------------------------------------------------------ |
---|
463 | if [ ${doTARsrc} -eq 1 ] |
---|
464 | then |
---|
465 | rev=$( svn info | grep -i revision | awk '{print $NF}' ) |
---|
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} |
---|
478 | fi |
---|
479 | #------------------------------------------------------------------ |
---|
480 | if [ ${doTARdata} -eq 1 ] |
---|
481 | then |
---|
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} |
---|
493 | fi |
---|
494 | #------------------------------------------------------------------ |
---|
495 | if [ ${doforge} -eq 1 ] |
---|
496 | then |
---|
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}" |
---|
506 | fi |
---|
507 | #------------------------------------------------------------------ |
---|
508 | if [[ (${doDTAlocean} -eq 1) || (${doDTAipsl} -eq 1) ]] |
---|
509 | then |
---|
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_$$ |
---|
515 | #!/bin/bash |
---|
516 | cd SAXO_DIR |
---|
517 | # |
---|
518 | rm -rf DATA |
---|
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 ) |
---|
523 | # |
---|
524 | chmod -R 755 * |
---|
525 | exit |
---|
526 | # |
---|
527 | EOF |
---|
528 | fi |
---|
529 | #------------------------------------------------------------------ |
---|
530 | if [ ${doSRClocean} -eq 1 ] |
---|
531 | then |
---|
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" |
---|
536 | fi |
---|
537 | #------------------------------------------------------------------ |
---|
538 | if [ ${doDTAlocean} -eq 1 ] |
---|
539 | then |
---|
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_$$" |
---|
544 | fi |
---|
545 | #------------------------------------------------------------------ |
---|
546 | if [ ${doSRCipsl} -eq 1 ] |
---|
547 | then |
---|
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" |
---|
552 | fi |
---|
553 | #------------------------------------------------------------------ |
---|
554 | if [ ${doDTAipsl} -eq 1 ] |
---|
555 | then |
---|
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_$$" |
---|
560 | fi |
---|
561 | #------------------------------------------------------------------ |
---|
562 | if [ ${doSRCidris} -eq 1 ] |
---|
563 | then |
---|
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" |
---|
567 | fi |
---|
568 | #------------------------------------------------------------------ |
---|
569 | if [ ${doDTAidris} -eq 1 ] |
---|
570 | then |
---|
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_$$ |
---|
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" |
---|
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 ) |
---|
589 | # |
---|
590 | chmod -R 755 * |
---|
591 | exit |
---|
592 | # |
---|
593 | EOF |
---|
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_$$" |
---|
598 | fi |
---|
599 | #------------------------------------------------------------------ |
---|
600 | if [ ${dodocdownload} -eq 1 ] |
---|
601 | then |
---|
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_${$}/ |
---|
637 | fi |
---|
638 | # |
---|
639 | # update wiki pages |
---|
640 | if [ ${dowikiupdate} -eq 1 ] |
---|
641 | then |
---|
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 |
---|
648 | fi |
---|
649 | #------------------------------------------------------------------ |
---|
650 | #------------------------------------------------------------------ |
---|
651 | # |
---|
652 | [ -f job_src_$$ ] && rm -f job_src_$$ |
---|
653 | [ -f job_data_$$ ] && rm -f job_data_$$ |
---|
654 | [ -f job_data_idris_$$ ] && rm -f job_data_idris_$$ |
---|
655 | # |
---|
656 | exit |
---|