Commit 2e0e4de2 authored by Mark Olesen's avatar Mark Olesen
Browse files

TUT: clean out old tutorial build directories

parent bba7511c
......@@ -3,6 +3,15 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/LogFunctions # Tutorial log-file functions
echo "--------"
# Remove old build/ directory
buildDir="$WM_PROJECT_DIR/build/${WM_OPTIONS}/${PWD##*/}"
if [ -d "$buildDir" ]
then
echo "Removing old build directory: $buildDir" 1>&2
rm -rf $buildDir
fi
removeLogs
echo "Cleaning tutorials ..."
......
......@@ -7,20 +7,8 @@
# \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
#
# Script
# Alltest
......@@ -101,9 +89,8 @@ done
#------------------------------------------------------------------------------
#
# set up a default scheme on all schemes
# Set up a default scheme on all schemes
#
setDefaultFvSchemes()
{
......@@ -180,6 +167,14 @@ then
rm -rf $TEST_RUN_DIR
fi
# Remove old build/ directory
buildDir="$WM_PROJECT_DIR/build/${WM_OPTIONS}/${TEST_RUN_DIR##*/}"
if [ -d "$buildDir" ]
then
echo "Removing old build directory: $buildDir" 1>&2
rm -rf $buildDir
fi
echo "Modifying ${MAIN_CONTROL_DICT}" 1>&2
if [ -e ${MAIN_CONTROL_DICT}.orig ]
then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment