From 170baf4d3b46bf877d84d21c55da6f8eeb358b69 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Mon, 10 Dec 2018 15:13:15 +0100
Subject: [PATCH] STYLE: use '&&', '||' instead of '-a' and '-o' for some shell
 commands

---
 etc/config.sh/ADIOS      | 2 +-
 etc/config.sh/functions  | 2 +-
 etc/config.sh/gperftools | 2 +-
 etc/config.sh/paraview   | 2 +-
 etc/config.sh/settings   | 4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/etc/config.sh/ADIOS b/etc/config.sh/ADIOS
index df1fec50e23..ed5dda9a18b 100644
--- a/etc/config.sh/ADIOS
+++ b/etc/config.sh/ADIOS
@@ -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
diff --git a/etc/config.sh/functions b/etc/config.sh/functions
index ead80710543..42aa068873e 100644
--- a/etc/config.sh/functions
+++ b/etc/config.sh/functions
@@ -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
diff --git a/etc/config.sh/gperftools b/etc/config.sh/gperftools
index e1d2a01a1cd..61649a7c325 100644
--- a/etc/config.sh/gperftools
+++ b/etc/config.sh/gperftools
@@ -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
diff --git a/etc/config.sh/paraview b/etc/config.sh/paraview
index b909281d985..87ba79beb9e 100644
--- a/etc/config.sh/paraview
+++ b/etc/config.sh/paraview
@@ -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
diff --git a/etc/config.sh/settings b/etc/config.sh/settings
index 23aec009a36..c0ea5654aa7 100644
--- a/etc/config.sh/settings
+++ b/etc/config.sh/settings
@@ -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 && \
-- 
GitLab