Index: /TOOLS/PACK_IPSL/showPackProgress.sh
===================================================================
--- /TOOLS/PACK_IPSL/showPackProgress.sh	(revision 1870)
+++ /TOOLS/PACK_IPSL/showPackProgress.sh	(revision 1871)
@@ -250,4 +250,5 @@
 	 nbOfListsNottreated=$(( $nbOfListsNottreated + 1 ))
 	 simuOK=$(( $simuOK && 0 )) # marque une simu pas OK
+     simutreated=$(( $simutreated && 0 )) # marque une simu non completement traitee
      fi
 
@@ -272,4 +273,5 @@
 outputFile=
 detailed_mode=1
+publish_mode=1
 while [ $# -gt 0 ]
 do
@@ -300,4 +302,6 @@
                      detailed_mode=0
                      ;;
+   -p) echo "option -p selectionnee : publication"
+       publish_mode=0      
    esac
    shift
@@ -340,4 +344,8 @@
 # exit 0 # gpdebug : a virer
 
+TotalNbSimu=0
+nbOfSimuPacked=0
+nbOfSimuFailed=0
+nbOfSimuNottreated=0
 nbOfListsPacked=0
 nbOfListsFailed=0
@@ -347,4 +355,11 @@
 totalTime=0
 
+TotalNbSimu=`cat ${IGCM_DEM}/config_card.liste |wc -l`
+
+if [ "x${outputFile}" == "x" ] && [ "x${publish_mode}" == "x0" ]
+then
+# Publication
+echo "Simulation;Status" > ${outputFile}_${USER}
+fi
 
 for CONFIG in $( awk '{print $1}' ${IGCM_DEM}/config_card.liste ) ; do 
@@ -367,5 +382,6 @@
     
     simuOK=1 
-    
+    simutreated=1
+ 
     if [ ! -e "${PATH_SIMU}/tar_full_simul.list" ]
     then
@@ -378,5 +394,5 @@
 	     then
 	        echo "      ${dir} n'existe pas pour cette simu" >> simuPrint.txt
-		simuOK=$(( $simuOK && 0 )) # marque une simu pas OK
+#		simuOK=$(( $simuOK && 0 )) # marque une simu pas OK
 	        continue
 	     fi
@@ -406,5 +422,20 @@
         resSimu="not OK"
     fi
-    
+
+    if [ "x${simutreated}" == "x0" ]
+    then
+        resSimu="not treated"
+    fi
+
+    if [ "x${resSimu}" == "xnot OK" ]
+    then
+       nbOfSimuFailed=$(( $nbOfSimuFailed + 1 )) 
+    elif [ "x${resSimu}" == "xnot treated" ]
+    then
+       nbOfSimuNottreated=$(( $nbOfSimuNottreated + 1 ))
+    else
+        nbOfSimuPacked=$(( $nbOfSimuPacked + 1 ))
+    fi
+
     if [ "x${outputFile}" == "x" ]
     then
@@ -417,4 +448,6 @@
         fi
     else
+        if [ "x${publish_mode}" == "x1" ]
+        then
         echo "***************************************************" >> ${outputFile}
         echo "simulation : $simuName  ===> $resSimu"               >> ${outputFile}
@@ -424,4 +457,8 @@
     	    cat simuPrint.txt  $outRedirectStatement               >> ${outputFile}
         fi     
+        else
+# Publication
+        echo "$simuName;$resSimu" >> ${outputFile}_${USER}
+        fi
     fi 
     rm simuPrint.txt
@@ -447,4 +484,7 @@
     echo "#####  BILAN #####"
     echo "##################"
+    echo "nb of Simulations packed with success : ${nbOfSimuPacked} / ${TotalNbSimu}"
+    echo "nb of Simus failed : ${nbOfSimuFailed}"
+    echo "nb of Simus not treated : ${nbOfSimuNottreated}"
     echo "nb of Lists packed with success : ${nbOfListsPacked} / ${totalNbOfList}"
     echo "nb of fails : $nbOfListsFailed"
@@ -458,8 +498,13 @@
 
 else
+    if [ "x${publish_mode}" == "x1" ]
+        then
     echo
     echo "##################" >> ${outputFile}
     echo "#####  BILAN #####" >> ${outputFile}
     echo "##################" >> ${outputFile}
+    echo "nb of Simulations packed with success : ${nbOfSimuPacked} / ${TotalNbSimu}" >> ${outputFile}
+    echo "nb of Simus failed : ${nbOfSimuFailed}" >> ${outputFile}
+    echo "nb of Simus not treated : ${nbOfSimuNottreated}" >> ${outputFile}
     echo "nb of Lists packed with success : ${nbOfListsPacked} / ${totalNbOfList}" >> ${outputFile}
     echo "nb of fails : $nbOfListsFailed" >> ${outputFile}
@@ -471,4 +516,8 @@
     echo "Total time for elementary operations : $totalTime" >> ${outputFile}
     echo "Time since launch start : $timeSinceLaunchStart" >> ${outputFile}
-
+    else
+# Publication
+    echo "User;TotalNbSimu;NbOfSimuPacked;NbOfSimuFailed;NbOfSimuNottreated;TotalNbOfList;NbOfListsPacked;NbOfListsFailed;NbOfListsNottreated;TotalNbFiles;Nbfilestreated;Nbfilesafter;NbSimuTar" > ${outputFile}
+    echo "${USER};${TotalNbSimu};${nbOfSimuPacked};${nbOfSimuFailed};${nbOfSimuNottreated};${totalNbOfList};${nbOfListsPacked};$nbOfListsFailed;${nbOfListsNottreated};$TotalNbInodes;$NbInodeBefore;$NbInodeAfter;$TotalSimuTar" >> ${outputFile}
+    fi
 fi
