summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Lambert <guillaume.lambert@orange.com>2021-03-09 21:41:30 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-04-14 13:26:30 +0000
commit785bc3875ee2c3a45caf6ba2244d5e3b6e6b36b1 (patch)
treedadeb1a1439eddf4920891e6b666ad671ec34cc2
parentd3166747bb93ccaba9d471acce373850d7d6f35f (diff)
[COMMON] Fix function declarations bashisms
pointed out by checkbashisms. $ mycmd=$(tox -e checkbashisms | grep "^possible .*'function' is useless " | sed -e "s@^[^.]*\(.[^ ]*\) line \([0-9]*\) .*@sed -i -e '\2s/functio n \\\([^ ()]*\\\) *(\\\?)\\\?/\\\1 ()/\' -e '\2s/(){/() {/' \1;@") $ eval $mycmd Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: Ic41c8ba8288b7a90db9f5775cd601c09ff2ab663
-rwxr-xr-xkubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh2
-rw-r--r--kubernetes/common/cassandra/resources/restore.sh4
-rwxr-xr-xkubernetes/config/prepull_docker.sh2
-rwxr-xr-xkubernetes/robot/demo-k8s.sh2
-rwxr-xr-xkubernetes/robot/instantiate-k8s.sh4
-rwxr-xr-xkubernetes/sdnc/resources/geo/bin/switchVoting.sh2
6 files changed, 8 insertions, 8 deletions
diff --git a/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh b/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh
index 25a5c319bd..c78daee558 100755
--- 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 @@
#set -x
*/}}
-function enable_odl_cluster(){
+enable_odl_cluster () {
if [ -z $APPC_REPLICAS ]; then
echo "APPC_REPLICAS is not configured in Env field"
exit
diff --git a/kubernetes/common/cassandra/resources/restore.sh b/kubernetes/common/cassandra/resources/restore.sh
index 798ab6c53c..b56c0fac70 100644
--- a/kubernetes/common/cassandra/resources/restore.sh
+++ b/kubernetes/common/cassandra/resources/restore.sh
@@ -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 @@ function find_target_table_name()
printf $dest_table_name
}
-function print_usage()
+print_usage ()
{
echo "NAME"
echo " Script to restore Cassandra database from Nuvo/Cain snapshot"
diff --git a/kubernetes/config/prepull_docker.sh b/kubernetes/config/prepull_docker.sh
index ef46334197..040adec23d 100755
--- a/kubernetes/config/prepull_docker.sh
+++ b/kubernetes/config/prepull_docker.sh
@@ -26,7 +26,7 @@ EOF
#argument: yaml file
#calling syntax: parse_yaml <yaml_file_name>
-function parse_yaml {
+parse_yaml () {
local prefix=$2
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "s|^\($s\):|\1|" \
diff --git a/kubernetes/robot/demo-k8s.sh b/kubernetes/robot/demo-k8s.sh
index 5d8fed829c..7ab384e8d0 100755
--- a/kubernetes/robot/demo-k8s.sh
+++ b/kubernetes/robot/demo-k8s.sh
@@ -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 " "
diff --git a/kubernetes/robot/instantiate-k8s.sh b/kubernetes/robot/instantiate-k8s.sh
index 67fd403a12..f10ad7e493 100755
--- a/kubernetes/robot/instantiate-k8s.sh
+++ b/kubernetes/robot/instantiate-k8s.sh
@@ -19,7 +19,7 @@ NAMESPACE=
FOLDER=
POLL=0
-function check_required_parameter() {
+check_required_parameter () {
# arg1 = parameter
# arg2 = parameter name
if [ -z "$1" ]; then
@@ -28,7 +28,7 @@ function check_required_parameter() {
fi
}
-function check_optional_paramater() {
+check_optional_paramater () {
# arg1 = parameter
# arg2 = parameter name
if [ -z $1 ]; then
diff --git a/kubernetes/sdnc/resources/geo/bin/switchVoting.sh b/kubernetes/sdnc/resources/geo/bin/switchVoting.sh
index 076f1ea35f..65b76265fc 100755
--- a/kubernetes/sdnc/resources/geo/bin/switchVoting.sh
+++ b/kubernetes/sdnc/resources/geo/bin/switchVoting.sh
@@ -16,7 +16,7 @@
# limitations under the License.
*/}}
-function usage()
+usage ()
{
echo usage: switchVoting.sh primary\|secondary
exit 1