Merge "[COMMON] Fix condition equality bashisms"
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 27 Apr 2021 20:25:19 +0000 (20:25 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 27 Apr 2021 20:25:19 +0000 (20:25 +0000)
1  2 
kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh
kubernetes/common/cassandra/resources/restore.sh
kubernetes/robot/demo-k8s.sh

@@@ -30,7 -30,7 +30,7 @@@
  #set -x
  */}}
  
 -function enable_odl_cluster(){
 +enable_odl_cluster () {
    if [ -z $APPC_REPLICAS ]; then
       echo "APPC_REPLICAS is not configured in Env field"
       exit
@@@ -83,7 -83,7 +83,7 @@@ the
  show databases like 'sdnctl';
  END
  )
-         if [ "x${sdnc_db_exists}" == "x" ]
+         if [ "x${sdnc_db_exists}" = "x" ]
          then
              echo "Installing SDNC database"
              ${SDNC_HOME}/bin/installSdncDb.sh
@@@ -92,7 -92,7 +92,7 @@@
  show databases like 'appcctl';
  END
  )
-             if [ "x${appc_db_exists}" == "x" ]
+             if [ "x${appc_db_exists}" = "x" ]
              then
                echo "Installing APPC database"
                ${APPC_HOME}/bin/installAppcDb.sh
@@@ -7,7 -7,7 +7,7 @@@ ss_name="
  ss="snapshots"
  me=`basename $0`
  
 -function find_target_table_name()
 +find_target_table_name ()
  {
      dest_path=$1
      keyspace_name=$2
@@@ -18,7 -18,7 +18,7 @@@
      printf $dest_table_name
  }
  
 -function print_usage()
 +print_usage ()
  {
        echo "NAME"
        echo "  Script to restore Cassandra database from Nuvo/Cain snapshot"
@@@ -75,7 -75,7 +75,7 @@@ esa
  done
  
  # Validate inputs
- if [ "$base_db_dir" == "" ] || [ "$ss_dir" == "" ] || [ "$keyspace_name" == "" ]
+ if [ "$base_db_dir" = "" ] || [ "$ss_dir" = "" ] || [ "$keyspace_name" = "" ]
  then
        echo ""
        echo ">>>>>>>>>>Not all inputs provided, please check usage >>>>>>>>>>"
@@@ -17,7 -17,7 +17,7 @@@
  #
  # Execute tags built to support the hands-on demo
  #
 -function usage
 +usage ()
  {
        echo "Usage: demo-k8s.sh <namespace> <command> [<parameters>] [execscript]"
        echo " "
@@@ -63,7 -63,7 +63,7 @@@
  
  # Check if execscript flag is used and drop it from input arguments
  
- if [[ "${!#}" == "execscript" ]]; then
+ if [[ "${!#}" = "execscript" ]]; then
          set -- "${@:1:$#-1}"
          execscript=true
  fi