Remove bashisms from build-image.sh
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 24 Nov 2022 16:54:44 +0000 (17:54 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 24 Nov 2022 16:54:44 +0000 (17:54 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
build-image.sh

index 15b2d7249632703bf73aef4565a6cd9a23793c27..b065201f7904604a34b519559862fed0c59b8013 100755 (executable)
@@ -43,9 +43,9 @@ while getopts ":b:p:ch" option; do
   case "${option}" in
     b)
       name=${OPTARG}
-      if [[ ${name} == "all" ]]; then
+      if [ ${name} = "all" ]; then
         build_all
-      elif [[ -z "${images##*$name*}" ]]; then
+      elif [ -z "${images##*$name*}" ]; then
         make NAME=${name}
       else
         echo "Error: Unknown image name as option argument '${OPTARG}'" >&2;
@@ -54,9 +54,9 @@ while getopts ":b:p:ch" option; do
       ;;
     p)
       repository=${OPTARG}
-      if [[ ${repository} == "all" ]]; then
+      if [ ${repository} = "all" ]; then
         push_all
-      elif [[ -z "${repositories##*$repository*}" ]]; then
+      elif [ -z "${repositories##*$repository*}" ]; then
         make docker-push-registry NAME=${repository}
       else
         echo "Error: Unknown repository name as option argument '${OPTARG}'" >&2;