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