foamCloneCase: corrected operation with no time dirs
This commit is contained in:
parent
6c5c27c0b1
commit
0042ee0f7f
1 changed files with 2 additions and 0 deletions
|
|
@ -62,6 +62,7 @@ error() {
|
|||
}
|
||||
|
||||
cpIfPresent() {
|
||||
echo $1
|
||||
[ -e "$1" ] && echo "... ${1##*/}" && cp -r "$1" "$2"
|
||||
}
|
||||
|
||||
|
|
@ -143,6 +144,7 @@ cpIfPresent "$srcDir/system" "$tgtDir"
|
|||
cpIfPresent "$srcDir/constant" "$tgtDir"
|
||||
|
||||
time_dir="$(foamListTimes -withZero -case "$srcDir" | $time_option)"
|
||||
[ -n "${time_dir}" ] && \
|
||||
cpIfPresent "$srcDir/${time_dir}" "$tgtDir"
|
||||
|
||||
[ "${time_dir}" = "0" -o -z "${time_dir}" ] && [ -z "$no_orig" ] && \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue