Index: trunk/SRC/Documentation/xmldoc/savesaxo.sh
===================================================================
--- trunk/SRC/Documentation/xmldoc/savesaxo.sh	(revision 87)
+++ trunk/SRC/Documentation/xmldoc/savesaxo.sh	(revision 88)
@@ -13,12 +13,19 @@
 doidldoc_assistant=0
 doidlwavedoc=0
-dotarsrc=1
-dotardata=0
+doTARsrc=1
+doTARdata=0
 doforge=1
-dolodyc=0
-#
+doSRClodyc=0
+doDTAlodyc=0
+doSRCidris=0
+doDTAidris=0
+#
+#
+# get the date in a nice format
+#
+ndate=`date +%Y%m%d`
 # memorize current directory
 memopwd=$(pwd) # should be <working space>/SRC/Documentation/xmldoc
-#
+#------------------------------------------------------------------
 if [ ${dohtml} -eq 1 ]
 then
@@ -27,17 +34,12 @@
 #
     cd ${memopwd}
-    for docxml in firststeps.xml getsaxo.xml mailing.xml tiplink.xml updatesaxo.xml whatissaxo.xml whatsnew.xml
+    for docxml in firststeps.xml getsaxo.xml mailing.xml main.xml tiplink.xml updatesaxo.xml whatissaxo.xml whatsnew.xml
     do
-    ./makehtml.sh $(basename ${docxml})
+    ./makehtml.sh $(basename ${docxml} .xml)
  #   tidy -m $(basename ${docxml}).html
     done
     exit 0
 fi
-#
-# get the date in a nice format
-#
-ndate=`date +%Y%m%d`
-#
-#
+#------------------------------------------------------------------
 if [ ${dooldtest} -eq 1 ]
 then
@@ -48,4 +50,5 @@
     exit 0
 fi
+#------------------------------------------------------------------
 if  [ ${doidlwavedoc} -eq 1 ]
 then
@@ -57,4 +60,5 @@
     exit 0
 fi
+#------------------------------------------------------------------
 if  [ ${doidldoc_html} -eq 1 ]
 then
@@ -63,4 +67,5 @@
     exit 1
 fi
+#------------------------------------------------------------------
 if  [ ${doidldoc_assistant} -eq 1 ]
 then
@@ -69,13 +74,11 @@
     exit 1
 fi
-#
-if [ ${dotarsrc} -eq 1 ]
+#------------------------------------------------------------------
+if [ ${doTARsrc} -eq 1 ]
 then
     localtarbase=/tmp/savesaxo_${$}
     mkdir  ${localtarbase}/
 # clean backup files : *~
-#
-    cd ${memopwd}/../../..
-    find . -name "*~" -exec rm {} \;
+    find ${memopwd}/../../.. -name "*~" -exec rm {} \;
 # prepare the source tar (without the svn...)
 #
@@ -87,5 +90,6 @@
     ls -l ${localtarbase}
 fi
-if [ ${dotardata} -eq 1 ]
+#------------------------------------------------------------------
+if [ ${doTARdata} -eq 1 ]
 then
     localtarbase=/tmp/savesaxo_${$}
@@ -101,83 +105,98 @@
     ls -l ${localtarbase}
 fi
-#
+#------------------------------------------------------------------
 if [ ${doforge} -eq 1 ]
 then
     echo "iii : you will be asked saxo@forge.ipsl.jussieu.fr passwd two times"
-    if [ ${dotarsrc} -ne 1 ]
+    if [ ${doTARsrc} -ne 1 ]
     then
        localtarbase=${1} 
     fi
-    scp ${localtarbase}/*.tar.gz saxo@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/
+    scp ${localtarbase}/SAXO_*.tar.gz saxo@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/
     echo "iii : do not forget to update getsaxo.html"
     echo "iii : \$ ./makehtml.sh getsaxo"
     echo "iii : do not forget to clean ${localtarbase}"
 fi
-if [ $dolodyc -eq 1 ]
-then
-#
-# put the src files on cerbere
-#
-    cd ~/SAXO_RD
-    scp SAXO_RD_${ndate}.tar.gz smasson@cerbere.lodyc.jussieu.fr:.
-    cd ~/IDL
-    datafile=$( echo TestsData_*.tar.gz )
-    cat > job_$$ << EOF
+#------------------------------------------------------------------
+if [[ ($doSRClodyc -eq 1) || ($doDTAidris -eq 1) ]]
+then
+infosrc=$(ssh saxo@forge.ipsl.jussieu.fr ls -lht /ipsl/forge/projets/saxo/download/SAXO_SRC_*.tar.gz  | head -n 1)
+filesrc=$(echo ${infosrc} | awk '{print $NF}')
+filesrc=$( basename $filesrc )
+#
+    cat <<EOF > job_src_$$
 #!/bin/bash
-[ -f WWW/SAXO/DATA/$datafile ] && echo 0 || echo 1
+cd SAXO_DIR
+#
+rm -rf SRC
+wget http://forge.ipsl.jussieu.fr/saxo/download/$filesrc
+gunzip $filesrc
+tar xf $( basename $filesrc .gz )
+rm -f $( basename $filesrc .gz )
+#
+chmod -R 755 *
+exit
+#
 EOF
-    scp job_$$ smasson@cerbere.lodyc.jussieu.fr:.
-    err=$( ssh smasson@cerbere.lodyc.jussieu.fr \
-    "chmod 755 job_$$ ; ./job_$$ ; rm -f job4_$$" )
-    rm -f job_$$
-    [ $err -ne 0 ] && scp $datafile smasson@cerbere.lodyc.jussieu.fr:.
-#
-# create cerbere script...
-#
-    cd ~/SAXO_RD
-    cat <<EOF > job_$$
+fi
+#
+if [[ ($doDTAlodyc -eq 1) || ($doDTAidris -eq 1) ]]
+then
+infodata=$(ssh saxo@forge.ipsl.jussieu.fr ls -lht /ipsl/forge/projets/saxo/download/SAXO_DATA_*.tar.gz | head -n 1)
+filedata=$(echo ${infodata} | awk '{print $NF}')
+filedata=$(basename $filedata)
+    cat <<EOF > job_data_$$
 #!/bin/bash
-rm -rf WWW/SAXO/SRC SAXO_RD
-mkdir -p WWW/SAXO/SRC SAXO_RD
-[ ! -d  WWW/SAXO/DATA ] && mkdir -p WWW/SAXO/DATA
-# store SAXO_RD_${ndate}.tar.gz
-mv -f SAXO_RD_${ndate}.tar.gz WWW/SAXO/SRC/.
-# store $datafile
-if [ -f $datafile ]
-then
-    rm -f WWW/SAXO/DATA/TestsData_*.tar.gz
-    mv -f $datafile WWW/SAXO/DATA/.
-fi
-# redo SAXO_RD
-cd SAXO_RD
-ln -s ~/WWW/SAXO/SRC/SAXO_RD_${ndate}.tar.gz .
-tar xvfz SAXO_RD_${ndate}.tar.gz
-cd Tests
-ln -s ~/WWW/SAXO/DATA/TestsData_*.tar.gz .
-tar xvfz TestsData_*.tar.gz
-mkdir TestsData
-mv -f *.nc TestsData/.
-# redo WWW/SAXO
-cd /usr/home/smasson/WWW/SAXO/
-tar xvfz docall.tar.gz
-rm -f docall.tar.gz
-#
-cd
-chmod -R 755 SAXO_RD WWW
-# for rhodes...
-scp ~/WWW/SAXO/SRC/SAXO_RD_${ndate}.tar.gz reee217@rhodes.idris.fr:.
-ssh reee217@rhodes.idris.fr "rm -rf SAXO_RD ; mkdir SAXO_RD"
-ssh reee217@rhodes.idris.fr "mv SAXO_RD_${ndate}.tar.gz SAXO_RD/. ; cd SAXO_RD ; gunzip SAXO_RD_${ndate}.tar.gz"
-ssh reee217@rhodes.idris.fr "cd SAXO_RD ; tar xvf SAXO_RD_${ndate}.tar ; gzip SAXO_RD_${ndate}.tar"
-ssh reee217@rhodes.idris.fr "chmod -R 755 SAXO_RD"
+cd SAXO_DIR
+#
+rm -rf DATA
+wget http://forge.ipsl.jussieu.fr/saxo/download/$filedata
+gunzip $filedata
+tar xf $( basename $filedata .gz )
+rm -f $( basename $filedata .gz )
+#
+chmod -R 755 *
+exit
 #
 EOF
-#
-# update cerbere...
-#
-    scp job_$$ smasson@cerbere.lodyc.jussieu.fr:.
-    ssh smasson@cerbere.lodyc.jussieu.fr "chmod 755 job_$$ ; ./job_$$ ; rm -f job_$$"
-    rm -f job_$$
-#
-#
-fi
+fi
+#------------------------------------------------------------------
+if [ $doSRClodyc -eq 1 ]
+then
+# update src on cerbere
+#
+    echo "iii : update src on cerbere  cerbere"
+    scp job_src_$$ smasson@cerbere.lodyc.jussieu.fr:.
+    ssh smasson@cerbere.lodyc.jussieu.fr "chmod 755 job_src_$$ ; ./job_src_$$ ; rm -f job_src_$$"
+fi
+#------------------------------------------------------------------
+if [ $doDTAlodyc -eq 1 ]
+then
+# update data on cerbere
+    echo "iii : update data on cerbere"
+    scp job_data_$$ smasson@cerbere.lodyc.jussieu.fr:.
+    ssh smasson@cerbere.lodyc.jussieu.fr "chmod 755 job_data_$$ ; ./job_data_$$ ; rm -f job_data_$$"
+fi
+#------------------------------------------------------------------
+if [ $doSRCidris -eq 1 ]
+then
+# update src on rhodes
+    echo "iii : update src to rhodes"
+    scp job_src_$$ reee217@rhodes.idris.fr:.
+    ssh reee217@rhodes.idris.fr "chmod 755 job_src_$$ ; ./job_src_$$ ; rm -f job_src_$$"
+fi
+#------------------------------------------------------------------
+if [ $doDTAidris -eq 1 ]
+then
+# update data on gaya
+    echo "iii : update data to gaya"
+    scp job_data_$$ reee217@gaya.idris.fr:.
+    ssh reee217@gaya.idris.fr "chmod 755 job_data_$$ ; ./job_data_$$ ; rm -f job_data_$$"
+fi
+#------------------------------------------------------------------
+#
+[ -f job_src_$$ ] && rm -f job_src_$$
+[ -f job_data_$$ ] && rm -f 
+#
+exit
+#
