#!/bin/sh
cd "${0%/*}" || exit 1    # Run from this directory

# Source tutorial clean functions
. "$WM_PROJECT_DIR/bin/tools/CleanFunctions"

removeRegionDirs ()
{
    _regionDirs="$(foamDictionary -keywords constant/materialProperties)"

    for _d in system constant
    do
        for _r in $_regionDirs
        do
            _dir="${_d}/${_r}"
            [ -d "$_dir" ] && rm -rf "$_dir"
        done
    done
}

cleanCase
removeRegionDirs
rm -rf 0 > /dev/null 2>&1
rm -rf constant/regionProperties > /dev/null 2>&1

#------------------------------------------------------------------------------
