File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
+ # Cleaning up stray functionObjectProperties files, see https://github.com/precice/openfoam-adapter/issues/26
3
4
openfoam_remove_empty_dirs () {
4
5
(
5
6
set -e -u
6
- echo " Looking for any time directories without results (e.g. stray functionObjectProperties files, see openfoam-adapter issue #26 on GitHub)... "
7
+ echo " Cleaning up any time directories without results"
7
8
8
9
for f in [0-9]* [0-9]* .[0-9]* ; do
9
10
if ! [ -f " ${f} /U" ] && ! [ -f " ${f} /T" ] && ! [ -f " ${f} /U.gz" ] && ! [ -f " ${f} /T.gz" ] && ! [ -f " ${f} /D" ] && ! [ -f " ${f} /pointD" ] && ! [ -f " ${f} /DD" ] && ! [ -f " ${f} /pointDD" ] && ! [ -f " ${f} /D.gz" ] && ! [ -f " ${f} /pointD.gz" ] && ! [ -f " ${f} /DD.gz" ] && ! [ -f " ${f} /pointDD.gz" ]; then
10
- rm -rfv " ${f} "
11
+ rm -rf " ${f} "
11
12
fi
12
13
done
13
14
if [ -d processor0 ]; then
14
15
for d in processor* ; do
15
16
cd " ${d} "
16
17
for f in [0-9]* [0-9]* .[0-9]* ; do
17
18
if ! [ -f " ${f} /U" ] && ! [ -f " ${f} /T" ] && ! [ -f " ${f} /U.gz" ] && ! [ -f " ${f} /T.gz" ] && ! [ -f " ${f} /D" ] && ! [ -f " ${f} /pointD" ] && ! [ -f " ${f} /DD" ] && ! [ -f " ${f} /pointDD" ] && ! [ -f " ${f} /D.gz" ] && ! [ -f " ${f} /pointD.gz" ] && ! [ -f " ${f} /DD.gz" ] && ! [ -f " ${f} /pointDD.gz" ]; then
18
- rm -rfv " ${f} "
19
+ rm -rf " ${f} "
19
20
fi
20
21
done
21
22
cd ..
22
23
done
23
24
fi
25
+ echo " Done."
24
26
)
25
27
}
You can’t perform that action at this time.
0 commit comments