STYLE: use '&&', '||' instead of '-a' and '-o' for some shell commands
This commit is contained in:
parent
51a3f4e6e4
commit
170baf4d3b
@ -49,7 +49,7 @@ then
|
||||
# outside of ThirdParty and should be added to the path.
|
||||
|
||||
ending="${ADIOS_ARCH_PATH##*-}"
|
||||
if [ "$ending" != none -a "$ending" != system ]
|
||||
if [ "$ending" != none ] && [ "$ending" != system ]
|
||||
then
|
||||
# PATH was already cleaned by etc/bashrc caller
|
||||
_foamAddPath $ADIOS_ARCH_PATH/bin
|
||||
|
@ -105,7 +105,7 @@ then
|
||||
foamVar_end="${1##*-}"
|
||||
|
||||
# Do not add (none) or a system directory
|
||||
if [ -z "$foamVar_prefix" -o "$foamVar_end" = none -o "$foamVar_end" = system ]
|
||||
if [ -z "$foamVar_prefix" ] || [ "$foamVar_end" = none ] || [ "$foamVar_end" = system ]
|
||||
then
|
||||
unset foamVar_prefix foamVar_end
|
||||
return 1
|
||||
|
@ -53,7 +53,7 @@ then
|
||||
# outside of ThirdParty and must be added to the lib-path.
|
||||
|
||||
ending="${GPERFTOOLS_ARCH_PATH##*-}"
|
||||
if [ "$ending" != none -a "$ending" != system ]
|
||||
if [ "$ending" != none ] && [ "$ending" != system ]
|
||||
then
|
||||
_foamAddLib $GPERFTOOLS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||
_foamAddPath $GPERFTOOLS_ARCH_PATH/bin
|
||||
|
@ -204,7 +204,7 @@ case "$ParaView_VERSION" in
|
||||
echo " PV_PLUGIN_PATH : $PV_PLUGIN_PATH" 1>&2
|
||||
fi
|
||||
else
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
if [ -n "$FOAM_VERBOSE" ] && [ -n "$PS1" ]
|
||||
then
|
||||
echo "No paraview found" 1>&2
|
||||
echo " ParaView_DIR : $ParaView_DIR" 1>&2
|
||||
|
@ -146,7 +146,7 @@ export FOAM_LIBBIN="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/lib"
|
||||
siteDir="$WM_PROJECT_DIR/site"
|
||||
|
||||
# User override
|
||||
if [ -d "$WM_PROJECT_SITE" -a "$WM_PROJECT_SITE" != "$siteDir" ]
|
||||
if [ -d "$WM_PROJECT_SITE" ] && [ "$WM_PROJECT_SITE" != "$siteDir" ]
|
||||
then
|
||||
siteDir="$WM_PROJECT_SITE"
|
||||
export WM_PROJECT_SITE
|
||||
@ -287,7 +287,7 @@ GCC_NOT_FOUND
|
||||
|
||||
# Add gmp/mpfr/mpc libraries to run-time environment.
|
||||
# Require that they exist, automatically find lib64/ or lib/.
|
||||
_foamAddLibAuto $gmpDir && \
|
||||
_foamAddLibAuto $gmpDir && \
|
||||
export GMP_ARCH_PATH=$gmpDir # For non-system CGAL
|
||||
|
||||
_foamAddLibAuto $mpfrDir && \
|
||||
|
Loading…
Reference in New Issue
Block a user