Skip to content

Commit fe69ac2

Browse files
IshaanDesaiMakisH
andauthored
Remove unnecessary clean_aste call from base cleaning (precice#413)
* Remove unnecessary clean_aste call from base cleaning * Make clean_aste work on any directory * Rephrase ASTE message * Revert "Rephrase ASTE message" This reverts commit 85ab387. * Add clean.sh to aste-turbine tutorial, which calls the clean_aste function * Check if clean.sh exists in the base tutorial folder, and if so, run it while cleaning the tutorial * Add comment to code which checks if a clean.sh exists in the base tutorial folder, and if yes, runs it --------- Co-authored-by: Gerasimos Chourdakis <[email protected]>
1 parent 6609df5 commit fe69ac2

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

aste-turbine/clean.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
set -e -u
3+
4+
. ../tools/cleaning-tools.sh
5+
6+
clean_aste .

tools/clean-tutorial-base.sh

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ set -e -u
55
. ../tools/cleaning-tools.sh
66

77
clean_tutorial .
8-
clean_aste
98
clean_precice_logs .
109
rm -fv ./*.log
1110
rm -fv ./*.vtu

tools/cleaning-tools.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ clean_tutorial() {
1212
echo "-- Cleaning up all cases in $(pwd)..."
1313
rm -rfv ./precice-run/
1414

15+
# Run clean.sh if it exists in the base tutorial directory
16+
if test "clean.sh"; then
17+
./clean.sh
18+
fi
19+
1520
for case in */; do
1621
if [ "${case}" = images/ ]; then
1722
continue
@@ -117,7 +122,8 @@ clean_su2() {
117122
clean_aste() {
118123
(
119124
set -e -u
120-
echo "--- Cleaning up ASTE results"
125+
cd "$1"
126+
echo "--- Cleaning up ASTE results in $(pwd)"
121127
rm -fv result.vtk result.stats.json
122128
rm -fvr fine_mesh coarse_mesh mapped
123129
)

0 commit comments

Comments
 (0)