Last change
on this file since 1862 was
1847,
checked in by acosce, 12 years ago
|
Add case where we tar all the simulation (< 1Go, or create_etat0_limit case)
|
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | |
---|
4 | while [ $# -ne 0 ] |
---|
5 | do |
---|
6 | case $1 in |
---|
7 | -h|--help|-help) |
---|
8 | echo "----------------------------------------------------------------------------" |
---|
9 | echo "Description:" |
---|
10 | echo "tar a full simulation" |
---|
11 | echo "----------------------------------------------------------------------------" |
---|
12 | exit ;; |
---|
13 | -*) |
---|
14 | `dirname $0`/tar_full_simu.sh -h |
---|
15 | exit ;; |
---|
16 | *) |
---|
17 | break ;; |
---|
18 | esac |
---|
19 | done |
---|
20 | |
---|
21 | dirin=$1 |
---|
22 | dirout=$2 |
---|
23 | config_card=$3 |
---|
24 | eval $(grep JobName ${config_card}) |
---|
25 | |
---|
26 | |
---|
27 | if [[ ! -f $PATH_SIMU/tar_full_simul.list ]] ; then |
---|
28 | `dirname $0`/tar_full_simu.sh -h |
---|
29 | exit |
---|
30 | fi |
---|
31 | |
---|
32 | fileout=${JobName}.tar |
---|
33 | filefirst=`head -n 1 $PATH_SIMU/tar_full_simul.list` |
---|
34 | dirinputfile=`dirname $filefirst` |
---|
35 | diroutputfile=`dirname $filefirst | sed -e "s%$dirin%$dirout%"` |
---|
36 | |
---|
37 | outputfile=$diroutputfile/${fileout} |
---|
38 | mkdir -p $diroutputfile |
---|
39 | |
---|
40 | |
---|
41 | tarcmd=tar |
---|
42 | taroptions="--format=posix -W -cf" |
---|
43 | |
---|
44 | cd $dirinputfile |
---|
45 | |
---|
46 | set_local="tar_full_simul.local" |
---|
47 | for file in $( cat $PATH_SIMU/tar_full_simul.list ) ; do |
---|
48 | basename $file >> "tar_full_simul.local" |
---|
49 | done |
---|
50 | |
---|
51 | $tarcmd $taroptions $outputfile --dereference --files-from tar_full_simul.local |
---|
52 | echo "====> TAR full simulation ${JobName}" |
---|
53 | rm -f tar_full_simul.local |
---|
Note: See
TracBrowser
for help on using the repository browser.