2 # Copyright (C) 2009-2013 CEA/DEN, EDF R&D
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 # Comm : Proc de sauvegarde de repertoire
26 ## ========================================================== Begin
30 if ( [ -z "$1" ] ) then
32 echo " *** Indiquez un repertoire a sauver"
37 radical=`echo $1 | cut -d/ -f1 | cut -d. -f1`
48 *.tgz ) radical=`echo $arg | cut -d. -f1`
59 d=* | -d=* ) dest=`echo $arg | cut -d= -f2`
62 * ) if ( [ $wait_dest ] ) then
66 liste_rep="$liste_rep $arg"
73 suff=`date '+%Y-%m-%d'`
74 suff2=`date '+%Y-%m-%d_%H-%M'`
76 fictar="$dest/$radical-$suff$psuff.tgz"
77 if ( [ -f $fictar ] ) then
78 fictar="$dest/$radical-$suff2$psuff.tgz"
81 tar cvfz$h $fictar $liste_rep
83 echo " ... Fichier cree : $fictar"