BUG: missing chdir in Allwclean for wallFunctionTable

STYLE: improve consistency in Allwclean scripts
This commit is contained in:
Mark Olesen 2017-02-23 01:07:10 +01:00
parent 32a78d12e2
commit c1ca2f4a38
11 changed files with 40 additions and 66 deletions

View File

@ -1,7 +1,8 @@
#!/bin/sh
cd ${0%/*} || exit 1
cd ${0%/*} || exit 1 # Run from this directory
wclean libso DPMTurbulenceModels
wclean
wclean MPPICFoam
#------------------------------------------------------------------------------

View File

@ -8,3 +8,5 @@ wmake $targetType DPMTurbulenceModels
wmake $targetType
wmake $targetType MPPICFoam
#------------------------------------------------------------------------------

View File

@ -1,5 +1,5 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
cd ${0%/*} || exit 1 # Run from this directory
wclean libso CompressibleTwoPhaseMixtureTurbulenceModels
wclean

View File

@ -4,5 +4,4 @@ cd ${0%/*} || exit 1 # Run from this directory
wclean libso helpTypes
wclean
#------------------------------------------------------------------------------

View File

@ -5,7 +5,4 @@ wclean libso foamPv
PVblockMeshReader/Allwclean
PVFoamReader/Allwclean
# remove dummy directory (see Allwmake)
rmdir Make 2>/dev/null
#------------------------------------------------------------------------------

View File

@ -24,10 +24,6 @@ case "$major" in
wmakeLibPv foamPv
PVblockMeshReader/Allwmake $targetType $*
PVFoamReader/Allwmake $targetType $*
# Dummy directory to trigger proper 'wclean all' behaviour
# - the Allwclean will otherwise not be used
mkdir -p Make
)
fi
;;

View File

@ -1,5 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
wclean libso tabulatedWallFunction
wclean
#------------------------------------------------------------------------------

View File

@ -1,26 +1,23 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Define how an mpi-versioned library is created
# clean the qualified directory
# Clean an mpi-versioned library
wcleanMpiLib()
{
for libName
do
case "$WM_MPLIB" in (*MPI*)
(
WM_OPTIONS="$WM_OPTIONS$WM_MPLIB"
wclean $libName
for libName
do
wclean $libName
done
)
done
;;
esac
}
wclean dummy
case "$WM_MPLIB" in
*MPI*)
wcleanMpiLib mpi
;;
esac
wcleanMpiLib mpi
#------------------------------------------------------------------------------

View File

@ -1,44 +1,26 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# get SCOTCH_VERSION, SCOTCH_ARCH_PATH
if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch`
then
. $settings
echo " using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH"
else
echo
echo " Error: no config.sh/scotch settings"
echo
fi
# Define how to clean an mpi-versioned library
# Clean an mpi-versioned library
wcleanMpiLib()
{
for libName
do
case "$WM_MPLIB" in (*MPI*)
(
WM_OPTIONS="$WM_OPTIONS$WM_MPLIB"
wclean $libName
for libName
do
wclean $libName
done
)
done
;;
esac
}
if [ -n "$SCOTCH_ARCH_PATH" ]
then
wclean scotchDecomp
if [ -d "$FOAM_LIBBIN/$FOAM_MPI" ]
then
wcleanMpiLib ptscotchDecomp
fi
else
echo " skipping scotchDecomp (ptscotchDecomp)"
fi
wclean scotchDecomp
wclean metisDecomp
wclean decompositionMethods
wclean decompose
wcleanMpiLib ptscotchDecomp
#------------------------------------------------------------------------------

View File

@ -1,11 +1,10 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
makeType=${1:-libso}
wclean $makeType regionModel
wclean $makeType pyrolysisModels
wclean $makeType surfaceFilmModels
wclean $makeType thermalBaffleModels
wclean $makeType regionCoupling
wclean libso regionModel
wclean libso pyrolysisModels
wclean libso surfaceFilmModels
wclean libso thermalBaffleModels
wclean libso regionCoupling
#------------------------------------------------------------------------------

View File

@ -128,8 +128,8 @@ then
}
fi
# Print command
echo "$Script $targetType${targetType:+ }${dir:-.}"
# Print command, trim off leading './' for readability
echo "$Script $targetType${targetType:+ }${dir#./}"
fi
@ -152,19 +152,18 @@ then
echo "Removing empty directories..."
# Get sub-directories avoiding particular directories
for dir in $(find . -mindepth 1 -maxdepth 1 \
-name .git -prune -o -type d -print)
for d in $(find . -mindepth 1 -maxdepth 1 \
-name .git -prune -o -type d -print)
do
echo " searching: $dir"
find $dir -depth -empty -type d -delete -print
echo " searching: ${d#./}"
find $d -depth -empty -type d -delete -print
done
# Second pass: clean up object directories with WM_PROJECT_DIR that don't
# have respective source code folders, along with the respective binaries
if [ "$(expandPath $PWD)" = "$WM_PROJECT_DIR" ]
then
objectsDir=$(findObjectDir $PWD) || exit 1 # Fatal
objectsDir=$(findObjectDir $PWD 2>/dev/null) || exit 1 # Fatal
if [ -d "$objectsDir" ]
then