mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
foamCopySettings: more readable with sed/tr
This commit is contained in:
@ -82,20 +82,13 @@ fileList=$(find -H $srcDir -mindepth 1 -maxdepth 1 -not -name "processor*")
|
||||
# avoid polyMesh and processor* directories
|
||||
rsync="rsync --exclude polyMesh --exclude processor*"
|
||||
|
||||
|
||||
#
|
||||
# get any extra options
|
||||
# only extract lines starting with --option xxx
|
||||
# get any extra user options
|
||||
# extract lines starting with '--longOption'
|
||||
#
|
||||
if rcFile=$(foamEtcFile $Script.rc)
|
||||
then
|
||||
userOpts=$(
|
||||
cat $rcFile | while read userOpts
|
||||
do
|
||||
[ "${userOpts##--}" != "${userOpts}" ] && echo $userOpts
|
||||
done
|
||||
)
|
||||
rsync="$rsync $userOpts"
|
||||
rsync="$rsync "$(sed -ne '/^ *--/p' $rcFile | tr '\n' ' ')
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user