Skip to content
Snippets Groups Projects
Commit b85c3501 authored by andy's avatar andy
Browse files

ENH: redirect to stderr when sourcing bashrc (Mark Olesen)

parent 26b19d07
Branches
Tags
No related merge requests found
...@@ -137,7 +137,7 @@ _foamSource() ...@@ -137,7 +137,7 @@ _foamSource()
{ {
while [ $# -ge 1 ] while [ $# -ge 1 ]
do do
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "Sourcing: $1" [ "$FOAM_VERBOSE" -a "$PS1" ] && echo "Sourcing: $1" 1>&2
. $1 . $1
shift shift
done done
...@@ -155,12 +155,12 @@ _foamEval() ...@@ -155,12 +155,12 @@ _foamEval()
;; ;;
*=) *=)
# name= -> unset name # name= -> unset name
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "unset ${1%=}" [ "$FOAM_VERBOSE" -a "$PS1" ] && echo "unset ${1%=}" 1>&2
eval "unset ${1%=}" eval "unset ${1%=}"
;; ;;
*=*) *=*)
# name=value -> export name=value # name=value -> export name=value
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "export $1" [ "$FOAM_VERBOSE" -a "$PS1" ] && echo "export $1" 1>&2
eval "export $1" eval "export $1"
;; ;;
*) *)
......
...@@ -53,7 +53,7 @@ unset foamPV ...@@ -53,7 +53,7 @@ unset foamPV
foamPV() foamPV()
{ {
. $WM_PROJECT_DIR/etc/config/paraview.sh ParaView_VERSION=$1 . $WM_PROJECT_DIR/etc/config/paraview.sh ParaView_VERSION=$1
echo "paraview-$ParaView_VERSION (major: $ParaView_MAJOR)" echo "paraview-$ParaView_VERSION (major: $ParaView_MAJOR)" 1>&2
} }
......
...@@ -93,7 +93,7 @@ Linux) ...@@ -93,7 +93,7 @@ Linux)
export WM_LDFLAGS='-m64' export WM_LDFLAGS='-m64'
;; ;;
*) *)
echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32 or 64" echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32 or 64" 1>&2
;; ;;
esac esac
;; ;;
...@@ -135,7 +135,7 @@ Linux) ...@@ -135,7 +135,7 @@ Linux)
;; ;;
*) *)
echo Unknown processor type `uname -m` for Linux echo Unknown processor type `uname -m` for Linux 1>&2
;; ;;
esac esac
;; ;;
...@@ -152,7 +152,7 @@ SunOS) ...@@ -152,7 +152,7 @@ SunOS)
;; ;;
*) # an unsupported operating system *) # an unsupported operating system
cat <<USAGE /bin/cat <<USAGE 1>&2
Your "$WM_ARCH" operating system is not supported by this release Your "$WM_ARCH" operating system is not supported by this release
of OpenFOAM. For further assistance, please contact www.OpenFOAM.org of OpenFOAM. For further assistance, please contact www.OpenFOAM.org
...@@ -268,11 +268,11 @@ OpenFOAM | ThirdParty) ...@@ -268,11 +268,11 @@ OpenFOAM | ThirdParty)
#clang_version=llvm-svn #clang_version=llvm-svn
;; ;;
*) *)
echo echo 1>&2
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
echo " Unknown OpenFOAM compiler type '$WM_COMPILER'" echo " Unknown OpenFOAM compiler type '$WM_COMPILER'" 1>&2
echo " Please check your settings" echo " Please check your settings" 1>&2
echo echo 1>&2
;; ;;
esac esac
...@@ -288,11 +288,11 @@ OpenFOAM | ThirdParty) ...@@ -288,11 +288,11 @@ OpenFOAM | ThirdParty)
# Check that the compiler directory can be found # Check that the compiler directory can be found
[ -d "$gccDir" ] || { [ -d "$gccDir" ] || {
echo echo 1>&2
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
echo " Cannot find $gccDir installation." echo " Cannot find $gccDir installation." 1>&2
echo " Please install this compiler version or if you wish to use the system compiler," echo " Please install this compiler version or if you wish to use the system compiler," 1>&2
echo " change the 'foamCompiler' setting to 'system'" echo " change the 'foamCompiler' setting to 'system'" 1>&2
echo echo
} }
...@@ -325,12 +325,12 @@ OpenFOAM | ThirdParty) ...@@ -325,12 +325,12 @@ OpenFOAM | ThirdParty)
# Check that the compiler directory can be found # Check that the compiler directory can be found
[ -d "$clangDir" ] || { [ -d "$clangDir" ] || {
echo echo 1>&2
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
echo " Cannot find $clangDir installation." echo " Cannot find $clangDir installation." 1>&2
echo " Please install this compiler version or if you wish to use the system compiler," echo " Please install this compiler version or if you wish to use the system compiler," 1>&2
echo " change the 'foamCompiler' setting to 'system'" echo " change the 'foamCompiler' setting to 'system'" 1>&2
echo echo 1>&2
} }
_foamAddMan $clangDir/share/man _foamAddMan $clangDir/share/man
...@@ -415,10 +415,10 @@ SYSTEMOPENMPI) ...@@ -415,10 +415,10 @@ SYSTEMOPENMPI)
if [ "$FOAM_VERBOSE" -a "$PS1" ] if [ "$FOAM_VERBOSE" -a "$PS1" ]
then then
echo "Using system installed MPI:" echo "Using system installed MPI:" 1>&2
echo " compile flags : $PINC" echo " compile flags : $PINC" 1>&2
echo " link flags : $PLIBS" echo " link flags : $PLIBS" 1>&2
echo " libmpi dir : $libDir" echo " libmpi dir : $libDir" 1>&2
fi fi
_foamAddLib $libDir _foamAddLib $libDir
...@@ -492,7 +492,7 @@ HPMPI) ...@@ -492,7 +492,7 @@ HPMPI)
_foamAddLib $MPI_ARCH_PATH/lib/linux_ia64 _foamAddLib $MPI_ARCH_PATH/lib/linux_ia64
;; ;;
*) *)
echo Unknown processor type `uname -m` for Linux echo Unknown processor type `uname -m` 1>&2
;; ;;
esac esac
;; ;;
...@@ -542,9 +542,9 @@ SGIMPI) ...@@ -542,9 +542,9 @@ SGIMPI)
if [ "$FOAM_VERBOSE" -a "$PS1" ] if [ "$FOAM_VERBOSE" -a "$PS1" ]
then then
echo "Using SGI MPT:" echo "Using SGI MPT:" 1>&2
echo " MPI_ROOT : $MPI_ROOT" echo " MPI_ROOT : $MPI_ROOT" 1>&2
echo " FOAM_MPI : $FOAM_MPI" echo " FOAM_MPI : $FOAM_MPI" 1>&2
fi fi
_foamAddPath $MPI_ARCH_PATH/bin _foamAddPath $MPI_ARCH_PATH/bin
...@@ -568,9 +568,9 @@ INTELMPI) ...@@ -568,9 +568,9 @@ INTELMPI)
if [ "$FOAM_VERBOSE" -a "$PS1" ] if [ "$FOAM_VERBOSE" -a "$PS1" ]
then then
echo "Using INTEL MPI:" echo "Using INTEL MPI:" 1>&2
echo " MPI_ROOT : $MPI_ROOT" echo " MPI_ROOT : $MPI_ROOT" 1>&2
echo " FOAM_MPI : $FOAM_MPI" echo " FOAM_MPI : $FOAM_MPI" 1>&2
fi fi
_foamAddPath $MPI_ARCH_PATH/bin64 _foamAddPath $MPI_ARCH_PATH/bin64
......
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