foamCopySettings: more readable with sed/tr

This commit is contained in:
Mark Olesen
2009-08-10 09:04:26 +02:00
parent 9960977642
commit ce567e4b76

View File

@ -82,20 +82,13 @@ 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*"
# #
# get any extra options # get any extra user options
# only extract lines starting with --option xxx # extract lines starting with '--longOption'
# #
if rcFile=$(foamEtcFile $Script.rc) if rcFile=$(foamEtcFile $Script.rc)
then then
userOpts=$( rsync="$rsync "$(sed -ne '/^ *--/p' $rcFile | tr '\n' ' ')
cat $rcFile | while read userOpts
do
[ "${userOpts##--}" != "${userOpts}" ] && echo $userOpts
done
)
rsync="$rsync $userOpts"
fi fi