From: Krzysztof Opasiak Date: Tue, 27 Apr 2021 20:25:19 +0000 (+0000) Subject: Merge "[COMMON] Fix condition equality bashisms" X-Git-Tag: 9.0.0~305 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=oom.git;a=commitdiff_plain;h=ad0f69e402aaff1e19a5330f3949d3f445b949b5;hp=-c Merge "[COMMON] Fix condition equality bashisms" --- ad0f69e402aaff1e19a5330f3949d3f445b949b5 diff --combined kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh index c78daee558,c91a460eb7..2fd6db1360 --- a/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh +++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.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 diff --combined kubernetes/common/cassandra/resources/restore.sh index b56c0fac70,48827d9f78..a8105345f7 --- a/kubernetes/common/cassandra/resources/restore.sh +++ b/kubernetes/common/cassandra/resources/restore.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 >>>>>>>>>>" diff --combined kubernetes/robot/demo-k8s.sh index 7ab384e8d0,d8268889db..d48070cf24 --- a/kubernetes/robot/demo-k8s.sh +++ b/kubernetes/robot/demo-k8s.sh @@@ -17,7 -17,7 +17,7 @@@ # # Execute tags built to support the hands-on demo # -function usage +usage () { echo "Usage: demo-k8s.sh [] [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