mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
Solves grep problem on Slackware 14.2 Patch contributed by Lorenzo Trevisan Resolves patch request https://bugs.openfoam.org/view.php?id=3012
30 lines
772 B
Bash
Executable File
30 lines
772 B
Bash
Executable File
#!/bin/sh
|
|
cd "${0%/*}" || exit 1 # Run from this directory
|
|
|
|
# Source tutorial clean functions
|
|
. "$WM_PROJECT_DIR/bin/tools/CleanFunctions"
|
|
|
|
removeRegionDirs () {
|
|
# HACK to get regionDirs from materialProperties
|
|
_regionDirs="$(grep "^[a-zA-Z]" constant/materialProperties | tail -n +2)"
|
|
|
|
for _d in system constant
|
|
do
|
|
for _r in $_regionDirs
|
|
do
|
|
_dir="${_d}/${_r}"
|
|
[ -d "$_dir" ] && rm -rf "$_dir"
|
|
done
|
|
done
|
|
|
|
find . -name "region*" -type d | xargs rm -rf
|
|
}
|
|
|
|
cleanCase
|
|
removeRegionDirs
|
|
rm -rf 0 > /dev/null 2>&1
|
|
rm -rf constant/regionProperties > /dev/null 2>&1
|
|
# rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
|
|
|
|
#------------------------------------------------------------------------------
|