[86] | 1 | #!/bin/bash |
---|
[111] | 2 | # |
---|
| 3 | # fplod 2006-06-19T08:46:39Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 4 | # for idldoc html output |
---|
| 5 | #. replace |
---|
| 6 | # -e 's/\(href=".*\)\(\.html\)\("\)/\1\2?format=raw\3/g' \ |
---|
| 7 | # -e 's/\(href=".*\)\(\.html\)\(#.*"\)/\1\2?format=raw\3/g' \ |
---|
| 8 | # -e 's/\(src=".*\)\(\.htmal\)\("\)/\1\2?format=raw\3/g' \ |
---|
| 9 | # by |
---|
| 10 | # -e 's@\(href="[^.]*[^h]*[^t]*[^m]*[^l]*[^"]*\)\(\.html\)\("\)@\1\2?format=raw\3@g' \ |
---|
| 11 | # -e 's@\(href="[^.]*[^h]*[^t]*[^m]*[^l]*[^"]*\)\(\.html\)\(#.*"\)@\1\2?format=raw\3@g' \ |
---|
| 12 | #-e 's@\(src="[^.]*[^h]*[^t]*[^m]*[^l]*[^"]*\)\(\.html\)\("\)@\1\2?format=raw\3@g' |
---|
| 13 | # in order to be able to add ?format=raw several time on one line |
---|
| 14 | # . suppress .html in line like |
---|
| 15 | # a parameter from the routine ./ReadWrite/idl-NetCDF/ncdf_read.html |
---|
| 16 | # in files idldoc-index*.html |
---|
[109] | 17 | # fplod 2006-06-14T12:41:37Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
[111] | 18 | # add embed paramater idldoc instructions to try to fix ticket#17 |
---|
[91] | 19 | # fplod 2006-06-07T12:11:50Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 20 | # add g option in ?format=raw sed transformation in order to fix |
---|
| 21 | # link on top of idldoc like directory-overview.html |
---|
[90] | 22 | # fplod 2006-06-07T10:57:35Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 23 | # add ?format=raw in idldoc production for frames |
---|
[89] | 24 | # fplod 2006-06-07T08:14:15Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 25 | # add action for idldochtml |
---|
[86] | 26 | # fplod 2006-06-02T14:28:30Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 27 | # modification to produce tar files in /tmp/saxo_${$} when dotar=1 |
---|
| 28 | # modification to copy tar files on http://forge.ipsl.jussieu.fr/saxo/download/ |
---|
| 29 | # when doforge=1 |
---|
| 30 | # produce tar files in /tmp/saxo_${$} when dotar=1 |
---|
| 31 | set -x |
---|
| 32 | set -u |
---|
| 33 | # |
---|
[111] | 34 | docompileall=1 |
---|
[86] | 35 | dohtml=0 |
---|
| 36 | dooldtest=0 |
---|
[107] | 37 | doidlwavedoc=0 |
---|
[100] | 38 | doidldoc_html=0 |
---|
[86] | 39 | doidldoc_assistant=0 |
---|
[111] | 40 | doTARsrc=0 |
---|
[88] | 41 | doTARdata=0 |
---|
[111] | 42 | doforge=0 |
---|
[88] | 43 | doSRClodyc=0 |
---|
| 44 | doDTAlodyc=0 |
---|
[100] | 45 | doSRCipsl=0 |
---|
| 46 | doDTAipsl=0 |
---|
| 47 | doSRCidris=0 |
---|
| 48 | doDTAidris=0 |
---|
[86] | 49 | # |
---|
[100] | 50 | case $( whoami ) in |
---|
| 51 | smasson) |
---|
| 52 | lgforge=smasson |
---|
| 53 | ;; |
---|
| 54 | floseb) |
---|
| 55 | lgforge=smasson |
---|
| 56 | ;; |
---|
| 57 | *) |
---|
| 58 | lgforge=saxo |
---|
| 59 | ;; |
---|
| 60 | esac |
---|
[88] | 61 | # |
---|
[100] | 62 | if [ ${lgforge} != smasson ] |
---|
| 63 | then |
---|
| 64 | doSRClodyc=0 |
---|
| 65 | doDTAlodyc=0 |
---|
| 66 | doSRCipsl=0 |
---|
| 67 | doDTAipsl=0 |
---|
| 68 | doSRCidris=0 |
---|
| 69 | doDTAidris=0 |
---|
| 70 | fi |
---|
| 71 | # |
---|
[88] | 72 | # get the date in a nice format |
---|
| 73 | # |
---|
| 74 | ndate=`date +%Y%m%d` |
---|
[86] | 75 | # memorize current directory |
---|
| 76 | memopwd=$(pwd) # should be <working space>/SRC/Documentation/xmldoc |
---|
[100] | 77 | # |
---|
[88] | 78 | #------------------------------------------------------------------ |
---|
[100] | 79 | if [ ${docompileall} -eq 1 ] |
---|
| 80 | then |
---|
| 81 | cat <<EOF > /tmp/compileall${$}.pro |
---|
| 82 | !path = expand_path('+' + '../..') + ':' + expand_path('+' + !dir) |
---|
| 83 | keep_compatibility, 0 |
---|
| 84 | @all_cm |
---|
| 85 | EOF |
---|
| 86 | # |
---|
| 87 | for i in $( find ${memopwd}/../../ -name "*.pro" ) |
---|
| 88 | do |
---|
| 89 | # does it contains return ? |
---|
| 90 | grep -iq '^ *return' $i |
---|
| 91 | if [ $? -eq 0 ] |
---|
| 92 | then |
---|
| 93 | # does it contains pro or function ? |
---|
| 94 | egrep -iq '^ *(pro|function)' $i |
---|
| 95 | if [ $? -eq 0 ] |
---|
| 96 | then |
---|
| 97 | echo ".r $( basename $i .pro )" >> /tmp/compileall${$}.pro |
---|
| 98 | fi |
---|
| 99 | fi |
---|
| 100 | done |
---|
| 101 | echo exit >> /tmp/compileall${$}.pro |
---|
| 102 | IDL_STARTUP=/tmp/compileall${$}.pro |
---|
| 103 | $IDL_DIR/bin/idl &> /tmp/compileallerr_${$} |
---|
| 104 | echo |
---|
| 105 | echo |
---|
[105] | 106 | grep -q "Compilation error(s)" /tmp/compileallerr_${$} |
---|
| 107 | if [ ${?} -ne 0 ] |
---|
| 108 | then |
---|
| 109 | echo "ALL SAXO files are OK..." |
---|
| 110 | rm -f /tmp/compileallerr_${$} /tmp/compileall${$}.pro |
---|
| 111 | else |
---|
| 112 | grep "Compilation error(s)" /tmp/compileallerr_${$} |
---|
| 113 | echo "eee : see /tmp/compileallerr_${$}" |
---|
| 114 | exit 1 |
---|
| 115 | fi |
---|
[100] | 116 | echo |
---|
| 117 | echo |
---|
| 118 | fi |
---|
| 119 | #------------------------------------------------------------------ |
---|
[86] | 120 | if [ ${dohtml} -eq 1 ] |
---|
| 121 | then |
---|
| 122 | # |
---|
| 123 | # redo the html file |
---|
| 124 | # |
---|
| 125 | cd ${memopwd} |
---|
[88] | 126 | for docxml in firststeps.xml getsaxo.xml mailing.xml main.xml tiplink.xml updatesaxo.xml whatissaxo.xml whatsnew.xml |
---|
[86] | 127 | do |
---|
[88] | 128 | ./makehtml.sh $(basename ${docxml} .xml) |
---|
[86] | 129 | # tidy -m $(basename ${docxml}).html |
---|
| 130 | done |
---|
| 131 | exit 0 |
---|
| 132 | fi |
---|
[88] | 133 | #------------------------------------------------------------------ |
---|
[86] | 134 | if [ ${dooldtest} -eq 1 ] |
---|
| 135 | then |
---|
| 136 | # make the old test |
---|
| 137 | # |
---|
| 138 | cd ${memopwd}/../../Tests/ |
---|
| 139 | ./makeold.sh |
---|
| 140 | exit 0 |
---|
| 141 | fi |
---|
[88] | 142 | #------------------------------------------------------------------ |
---|
[86] | 143 | if [ ${doidlwavedoc} -eq 1 ] |
---|
| 144 | then |
---|
| 145 | # |
---|
| 146 | # redo idlwave doc |
---|
| 147 | # |
---|
[107] | 148 | cd ${memopwd}/../.. |
---|
[86] | 149 | Documentation/idlwave_catalog -v -f saxo |
---|
| 150 | exit 0 |
---|
| 151 | fi |
---|
[88] | 152 | #------------------------------------------------------------------ |
---|
[86] | 153 | if [ ${doidldoc_html} -eq 1 ] |
---|
| 154 | then |
---|
| 155 | # |
---|
[89] | 156 | # build a idl file to launch idldoc |
---|
[111] | 157 | output=../idldoc_html_output/ |
---|
| 158 | log="/tmp/idldochtlm_${$}.log" |
---|
| 159 | pro="/tmp/idldochtlm_${$}.pro" |
---|
| 160 | cat <<EOF > ${pro} |
---|
[89] | 161 | !path = expand_path('+' + '../idldoc/') |
---|
| 162 | print,!path |
---|
[111] | 163 | idldoc,root="../../",title="SAXO Documentation", $ |
---|
| 164 | LOG_FILE="${log}", $ |
---|
| 165 | output="${output}", /preformat, /embed |
---|
[89] | 166 | exit |
---|
| 167 | EOF |
---|
| 168 | # launch idl with the file built above |
---|
[111] | 169 | IDL_STARTUP=${pro};idl |
---|
| 170 | /bin/rm ${pro} |
---|
[89] | 171 | # In order to do not have to many revision in svn, we modify some |
---|
| 172 | # lines produced by idldoc : |
---|
| 173 | # examples : |
---|
| 174 | # <!-- Generated by IDLdoc 2.0 on Wed Jun 7 10:25:28 2006 --> |
---|
| 175 | # will be replaced by |
---|
| 176 | # <!-- Generated by IDLdoc 2.0 --> |
---|
| 177 | # <div id="tagline">Produced by IDLdoc 2.0 on Wed Jun 7 10:54:37 2006.</div |
---|
| 178 | # will be replaced by |
---|
| 179 | # <div id="tagline">Produced by IDLdoc 2.0</div> |
---|
| 180 | # <h2>Produced on Wed Jun 7 10:23:13 2006</h2> |
---|
| 181 | # will be delete |
---|
| 182 | # other lines will be deleted because the time is the time of checkout not |
---|
| 183 | # the time of revision. |
---|
| 184 | # the sequence of lines |
---|
| 185 | #<dl> |
---|
| 186 | # <dt>Last modification:</dt> |
---|
| 187 | # <dd>Fri Jun 2 11:46:24 2006</dd> |
---|
| 188 | # </dl> |
---|
| 189 | # should also be removed ++ je ne sais pas dire en sed la ligne |
---|
| 190 | # suivant l'occurence de Last modification |
---|
[111] | 191 | # add ?format=raw to links on html files |
---|
| 192 | list_html=$(find ${output} -name "*.html") |
---|
[89] | 193 | for file_html in ${list_html} |
---|
| 194 | do |
---|
| 195 | sed \ |
---|
| 196 | -e "s/\(Generated by IDLdoc 2.0\)\( on .*\)\( -->\)/\1\3/" \ |
---|
| 197 | -e "s/\(Produced by IDLdoc 2.0\)\( on .*\)\(\.<\/div>\)/\1\3/" \ |
---|
| 198 | -e "/<h2>Produced on/d" \ |
---|
| 199 | -e "/Last modification:/d" \ |
---|
| 200 | -e "/<dd>... ... .* ..:..:.. ....<\/dd>/d" \ |
---|
[111] | 201 | -e 's@\(href="[^.]*[^h]*[^t]*[^m]*[^l]*[^"]*\)\(\.html\)\("\)@\1\2?format=raw\3@g' \ |
---|
| 202 | -e 's@\(href="[^.]*[^h]*[^t]*[^m]*[^l]*[^"]*\)\(\.html\)\(#.*"\)@\1\2?format=raw\3@g' \ |
---|
| 203 | -e 's@\(src="[^.]*[^h]*[^t]*[^m]*[^l]*[^"]*\)\(\.html\)\("\)@\1\2?format=raw\3@g' \ |
---|
[89] | 204 | ${file_html} > ${file_html}_modify |
---|
| 205 | mv ${file_html}_modify ${file_html} |
---|
| 206 | done |
---|
[111] | 207 | # suppress ".html" in idldoc-index*.html in lines like |
---|
| 208 | # a parameter from the routine ./ReadWrite/idl-NetCDF/ncdf_read.html |
---|
| 209 | list_html=$(find ${output} -name "idldoc-index*.html") |
---|
| 210 | for file_html in ${list_html} |
---|
| 211 | do |
---|
| 212 | sed \ |
---|
| 213 | -e "s/\(a parameter from the routine \)\(.*\)\(.html\)/\1\2/" \ |
---|
| 214 | ${file_html} > ${file_html}_modify |
---|
| 215 | mv ${file_html}_modify ${file_html} |
---|
| 216 | done |
---|
| 217 | echo "iii : you can see log file in ${log}" |
---|
| 218 | echo "iii : and look ${output}/idldoc-warnings.html#undoc" |
---|
[86] | 219 | exit 1 |
---|
| 220 | fi |
---|
[88] | 221 | #------------------------------------------------------------------ |
---|
[86] | 222 | if [ ${doidldoc_assistant} -eq 1 ] |
---|
| 223 | then |
---|
| 224 | # |
---|
| 225 | echo "eee : pas encore ecrit" |
---|
| 226 | exit 1 |
---|
| 227 | fi |
---|
[88] | 228 | #------------------------------------------------------------------ |
---|
| 229 | if [ ${doTARsrc} -eq 1 ] |
---|
[86] | 230 | then |
---|
| 231 | localtarbase=/tmp/savesaxo_${$} |
---|
| 232 | mkdir ${localtarbase}/ |
---|
[87] | 233 | # clean backup files : *~ |
---|
[88] | 234 | find ${memopwd}/../../.. -name "*~" -exec rm {} \; |
---|
[87] | 235 | # prepare the source tar (without the svn...) |
---|
[86] | 236 | # |
---|
[87] | 237 | cd ${memopwd}/../../.. |
---|
| 238 | tar czf ${localtarbase}/SAXO_SRC_${ndate}.tar.gz --exclude .svn SRC |
---|
[86] | 239 | # |
---|
[87] | 240 | # informations |
---|
[89] | 241 | echo "iii : following file may be copied on http://forge.ipsl.jussieu.fr/saxo/download/" |
---|
[87] | 242 | ls -l ${localtarbase} |
---|
| 243 | fi |
---|
[88] | 244 | #------------------------------------------------------------------ |
---|
| 245 | if [ ${doTARdata} -eq 1 ] |
---|
[87] | 246 | then |
---|
| 247 | localtarbase=/tmp/savesaxo_${$} |
---|
| 248 | mkdir ${localtarbase}/ |
---|
[86] | 249 | # |
---|
[87] | 250 | # prepare the data tar (without the svn...) |
---|
| 251 | # |
---|
| 252 | cd ${memopwd}/../../.. |
---|
| 253 | tar czf ${localtarbase}/SAXO_DATA_${ndate}.tar.gz --exclude .svn DATA |
---|
| 254 | # |
---|
[86] | 255 | # informations |
---|
[89] | 256 | echo "iii : following file may be copied on http://forge.ipsl.jussieu.fr/saxo/download/" |
---|
[86] | 257 | ls -l ${localtarbase} |
---|
| 258 | fi |
---|
[88] | 259 | #------------------------------------------------------------------ |
---|
[86] | 260 | if [ ${doforge} -eq 1 ] |
---|
| 261 | then |
---|
[100] | 262 | echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd two times" |
---|
[88] | 263 | if [ ${doTARsrc} -ne 1 ] |
---|
[86] | 264 | then |
---|
[89] | 265 | localtarbase=${1} |
---|
[86] | 266 | fi |
---|
[100] | 267 | scp ${localtarbase}/SAXO_*.tar.gz ${lgforge}@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/ |
---|
[86] | 268 | echo "iii : do not forget to update getsaxo.html" |
---|
| 269 | echo "iii : \$ ./makehtml.sh getsaxo" |
---|
| 270 | echo "iii : do not forget to clean ${localtarbase}" |
---|
| 271 | fi |
---|
[88] | 272 | #------------------------------------------------------------------ |
---|
[100] | 273 | if [[ ($doSRClodyc -eq 1) || ($doSRCipsl -eq 1) ]] |
---|
[86] | 274 | then |
---|
[100] | 275 | echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd" |
---|
| 276 | infosrc=$(ssh ${lgforge}@forge.ipsl.jussieu.fr ls -lht /ipsl/forge/projets/saxo/download/SAXO_SRC_*.tar.gz | head -n 1) |
---|
| 277 | filesrc=$(echo ${infosrc} | awk '{print $NF}') |
---|
| 278 | filesrc=$( basename $filesrc ) |
---|
[86] | 279 | # |
---|
[88] | 280 | cat <<EOF > job_src_$$ |
---|
[100] | 281 | #!/bin/bash |
---|
[88] | 282 | cd SAXO_DIR |
---|
[86] | 283 | # |
---|
[88] | 284 | rm -rf SRC |
---|
| 285 | wget http://forge.ipsl.jussieu.fr/saxo/download/$filesrc |
---|
| 286 | gunzip $filesrc |
---|
[100] | 287 | tar vxfz $filesrc |
---|
| 288 | rm -f $filesrc |
---|
[86] | 289 | # |
---|
[88] | 290 | chmod -R 755 * |
---|
| 291 | exit |
---|
| 292 | # |
---|
| 293 | EOF |
---|
[86] | 294 | fi |
---|
| 295 | # |
---|
[100] | 296 | if [[ ($doDTAlodyc -eq 1) || ($doDTAipsl -eq 1) ]] |
---|
[88] | 297 | then |
---|
[100] | 298 | echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd" |
---|
| 299 | infodata=$(ssh ${lgforge}@forge.ipsl.jussieu.fr ls -lht /ipsl/forge/projets/saxo/download/SAXO_DATA_*.tar.gz | head -n 1) |
---|
| 300 | filedata=$(echo ${infodata} | awk '{print $NF}') |
---|
| 301 | filedata=$(basename $filedata) |
---|
[88] | 302 | cat <<EOF > job_data_$$ |
---|
[100] | 303 | #!/bin/bash |
---|
[88] | 304 | cd SAXO_DIR |
---|
[86] | 305 | # |
---|
[88] | 306 | rm -rf DATA |
---|
| 307 | wget http://forge.ipsl.jussieu.fr/saxo/download/$filedata |
---|
[100] | 308 | tar vxfz $filedata |
---|
| 309 | rm -f $filedata |
---|
[88] | 310 | # |
---|
| 311 | chmod -R 755 * |
---|
| 312 | exit |
---|
| 313 | # |
---|
[86] | 314 | EOF |
---|
[88] | 315 | fi |
---|
| 316 | #------------------------------------------------------------------ |
---|
| 317 | if [ $doSRClodyc -eq 1 ] |
---|
| 318 | then |
---|
| 319 | # update src on cerbere |
---|
[86] | 320 | # |
---|
[100] | 321 | echo "iii : update src on cerbere" |
---|
[88] | 322 | scp job_src_$$ smasson@cerbere.lodyc.jussieu.fr:. |
---|
| 323 | ssh smasson@cerbere.lodyc.jussieu.fr "chmod 755 job_src_$$ ; ./job_src_$$ ; rm -f job_src_$$" |
---|
| 324 | fi |
---|
| 325 | #------------------------------------------------------------------ |
---|
| 326 | if [ $doDTAlodyc -eq 1 ] |
---|
| 327 | then |
---|
| 328 | # update data on cerbere |
---|
| 329 | echo "iii : update data on cerbere" |
---|
| 330 | scp job_data_$$ smasson@cerbere.lodyc.jussieu.fr:. |
---|
| 331 | ssh smasson@cerbere.lodyc.jussieu.fr "chmod 755 job_data_$$ ; ./job_data_$$ ; rm -f job_data_$$" |
---|
| 332 | fi |
---|
| 333 | #------------------------------------------------------------------ |
---|
[100] | 334 | if [ $doSRCipsl -eq 1 ] |
---|
| 335 | then |
---|
| 336 | # update src on cook |
---|
| 337 | # |
---|
| 338 | echo "iii : update src on cook" |
---|
| 339 | scp job_src_$$ smlod@cook.ipsl.jussieu.fr:. |
---|
| 340 | ssh smlod@cook.ipsl.jussieu.fr "chmod 755 job_src_$$ ; ./job_src_$$ ; rm -f job_src_$$" |
---|
| 341 | fi |
---|
| 342 | #------------------------------------------------------------------ |
---|
| 343 | if [ $doDTAipsl -eq 1 ] |
---|
| 344 | then |
---|
| 345 | # update data on cook |
---|
| 346 | echo "iii : update data on cook" |
---|
| 347 | scp job_data_$$ smlod@cook.ipsl.jussieu.fr:. |
---|
| 348 | ssh smlod@cook.ipsl.jussieu.fr "chmod 755 job_data_$$ ; ./job_data_$$ ; rm -f job_data_$$" |
---|
| 349 | fi |
---|
| 350 | #------------------------------------------------------------------ |
---|
[88] | 351 | if [ $doSRCidris -eq 1 ] |
---|
| 352 | then |
---|
[100] | 353 | # create the update script for rhodes |
---|
| 354 | if [[ ($doSRClodyc -eq 0) && ($doSRCipsl -eq 0) ]] |
---|
| 355 | then |
---|
| 356 | echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd" |
---|
| 357 | infosrc=$(ssh ${lgforge}@forge.ipsl.jussieu.fr ls -lht /ipsl/forge/projets/saxo/download/SAXO_SRC_*.tar.gz | head -n 1) |
---|
| 358 | filesrc=$(echo ${infosrc} | awk '{print $NF}') |
---|
| 359 | filesrc=$( basename $filesrc ) |
---|
| 360 | fi |
---|
| 361 | # |
---|
| 362 | cat <<EOF > job_src_idris_$$ |
---|
| 363 | #!/bin/ksh |
---|
| 364 | cd SAXO_DIR |
---|
| 365 | # |
---|
| 366 | rm -rf SRC |
---|
| 367 | echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd" |
---|
| 368 | scp ${lgforge}@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/$filesrc . |
---|
| 369 | gunzip $filesrc |
---|
| 370 | tar vxf $( basename $filesrc .gz ) |
---|
| 371 | rm -f $( basename $filesrc .gz ) |
---|
| 372 | # |
---|
| 373 | chmod -R 755 * |
---|
| 374 | exit |
---|
| 375 | # |
---|
| 376 | EOF |
---|
[88] | 377 | # update src on rhodes |
---|
| 378 | echo "iii : update src to rhodes" |
---|
[100] | 379 | scp job_src_idris_$$ reee217@rhodes.idris.fr:. |
---|
| 380 | ssh reee217@rhodes.idris.fr "chmod 755 job_src_idris_$$ ; ./job_src_idris_$$ ; rm -f job_src_idris_$$" |
---|
[88] | 381 | fi |
---|
| 382 | #------------------------------------------------------------------ |
---|
| 383 | if [ $doDTAidris -eq 1 ] |
---|
| 384 | then |
---|
[100] | 385 | # create the update script for rhodes |
---|
| 386 | if [[ ($doDTAlodyc -eq 0) && ($doDTAipsl -eq 0) ]] |
---|
| 387 | then |
---|
| 388 | echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd" |
---|
| 389 | infodata=$(ssh ${lgforge}@forge.ipsl.jussieu.fr ls -lht /ipsl/forge/projets/saxo/download/SAXO_DATA_*.tar.gz | head -n 1) |
---|
| 390 | filedata=$(echo ${infodata} | awk '{print $NF}') |
---|
| 391 | filedata=$(basename $filedata) |
---|
| 392 | fi |
---|
| 393 | cat <<EOF > job_data_idris_$$ |
---|
| 394 | #!/bin/ksh |
---|
| 395 | cd SAXO_DIR |
---|
| 396 | # |
---|
| 397 | rm -rf DATA |
---|
| 398 | echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd" |
---|
| 399 | scp ${lgforge}@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/$filedata . |
---|
| 400 | gunzip $filedata |
---|
| 401 | tar vxf $( basename $filedata .gz ) |
---|
| 402 | rm -f $( basename $filedata .gz ) |
---|
| 403 | # |
---|
| 404 | chmod -R 755 * |
---|
| 405 | exit |
---|
| 406 | # |
---|
| 407 | EOF |
---|
[88] | 408 | # update data on gaya |
---|
| 409 | echo "iii : update data to gaya" |
---|
[100] | 410 | scp job_data_idris_$$ reee217@gaya.idris.fr:. |
---|
| 411 | ssh reee217@gaya.idris.fr "chmod 755 job_data_idris_$$ ; ./job_data_idris_$$ ; rm -f job_data_idris_$$" |
---|
[88] | 412 | fi |
---|
| 413 | #------------------------------------------------------------------ |
---|
[86] | 414 | # |
---|
[88] | 415 | [ -f job_src_$$ ] && rm -f job_src_$$ |
---|
[100] | 416 | [ -f job_data_$$ ] && rm -f job_data_$$ |
---|
| 417 | [ -f job_src_idris_$$ ] && rm -f job_src_idris_$$ |
---|
| 418 | [ -f job_data_idris_$$ ] && rm -f job_data_idris_$$ |
---|
[86] | 419 | # |
---|
[88] | 420 | exit |
---|
[86] | 421 | # |
---|