mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
foamCopySettings - skip sampled directories and Ensight output directories
This commit is contained in:
@ -1,9 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -36,7 +36,7 @@
|
|||||||
# Note
|
# Note
|
||||||
# The foamCopySettings.rc (found with the ~OpenFOAM expansion) can be used
|
# The foamCopySettings.rc (found with the ~OpenFOAM expansion) can be used
|
||||||
# to add any custom rsync options.
|
# to add any custom rsync options.
|
||||||
#------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
Script=${0##*/}
|
Script=${0##*/}
|
||||||
if [ "$1" = "-h" -o "$1" = "-help" -o "$#" -ne 2 ]
|
if [ "$1" = "-h" -o "$1" = "-help" -o "$#" -ne 2 ]
|
||||||
then
|
then
|
||||||
@ -48,8 +48,8 @@ Usage: $Script srcDir dstDir
|
|||||||
- requires rsync
|
- requires rsync
|
||||||
|
|
||||||
Note
|
Note
|
||||||
The $Script.rc (found with the ~OpenFOAM expansion) can be used
|
The $Script.rc (found via the ~OpenFOAM expansion - see foamEtcFile)
|
||||||
to add any custom rsync options.
|
can be used to add any custom rsync options.
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
@ -78,7 +78,6 @@ done
|
|||||||
# avoid processor directories here too to make for cleaner output
|
# avoid processor directories here too to make for cleaner output
|
||||||
fileList=$(find -H $srcDir -mindepth 1 -maxdepth 1 -not -name "processor*")
|
fileList=$(find -H $srcDir -mindepth 1 -maxdepth 1 -not -name "processor*")
|
||||||
|
|
||||||
|
|
||||||
# avoid polyMesh and processor* directories
|
# avoid polyMesh and processor* directories
|
||||||
rsync="rsync --exclude polyMesh --exclude processor*"
|
rsync="rsync --exclude polyMesh --exclude processor*"
|
||||||
|
|
||||||
@ -108,15 +107,20 @@ do
|
|||||||
# skip numerical (results) directories (except 0)
|
# skip numerical (results) directories (except 0)
|
||||||
# and things that look like log files or queuing system output
|
# and things that look like log files or queuing system output
|
||||||
case "$name" in
|
case "$name" in
|
||||||
[1-9] | [0-9]?* | log | *.log | foam.[eo][1-9]* )
|
( [1-9] | [0-9]?* | log | *.log | foam.[eo][1-9]* )
|
||||||
echo "$i [skipped]"
|
echo "$i [skipped]"
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
*)
|
# skip things that look sampled directories and converted data
|
||||||
|
( probes | sets | surfaces | En[Ss]ight )
|
||||||
|
echo "$i [skipped]"
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
(*)
|
||||||
echo "$i -> $dstDir/$name"
|
echo "$i -> $dstDir/$name"
|
||||||
$rsync -a $i $dstDir
|
$rsync -a $i $dstDir
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# --------------------------------------------------------------- end-of-file
|
# ------------------------------------------------------------------ end-of-file
|
||||||
|
|||||||
Reference in New Issue
Block a user