diff --git a/.github/workflows/build-image.sh b/.github/workflows/build-image.sh index f80c63495f..72670f255c 100755 --- a/.github/workflows/build-image.sh +++ b/.github/workflows/build-image.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") set +e if [ "$PUSH" == "" ]; then diff --git a/build-docs.sh b/build-docs.sh index 306d9a3594..f7fb1c78a0 100755 --- a/build-docs.sh +++ b/build-docs.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") SCDIR=$(realpath $SCDIR) pushd "$SCDIR" > /dev/null || exit diff --git a/create-carvel-package.sh b/create-carvel-package.sh index d9b91a647e..b7bd5ac230 100755 --- a/create-carvel-package.sh +++ b/create-carvel-package.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") SCDIR=$(realpath $SCDIR) if [ "$SCDF_TYPE" = "" ]; then diff --git a/spring-cloud-dataflow-package/set-package-version.sh b/spring-cloud-dataflow-package/set-package-version.sh index 966f0a0451..f6de77518c 100755 --- a/spring-cloud-dataflow-package/set-package-version.sh +++ b/spring-cloud-dataflow-package/set-package-version.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 0 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") MVNW=$SCDIR/../mvnw if [ "$PACKAGE_VERSION" = "" ]; then diff --git a/spring-cloud-skipper/local/create-container.sh b/spring-cloud-skipper/local/create-container.sh index 14f30d50a2..cc2e88a03d 100644 --- a/spring-cloud-skipper/local/create-container.sh +++ b/spring-cloud-skipper/local/create-container.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 0 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") SCDIR=$(realpath $SCDIR) ROOT_DIR=$(realpath $SCDIR/..) diff --git a/spring-cloud-skipper/local/download-app.sh b/spring-cloud-skipper/local/download-app.sh index 31fc98a2b1..36aae23287 100644 --- a/spring-cloud-skipper/local/download-app.sh +++ b/spring-cloud-skipper/local/download-app.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 0 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") SCDIR=$(realpath $SCDIR) ROOT_DIR=$(realpath $SCDIR/..) diff --git a/src/deploy/carvel/add-local-registry-secret.sh b/src/deploy/carvel/add-local-registry-secret.sh index 270ab4a783..84909d7a53 100755 --- a/src/deploy/carvel/add-local-registry-secret.sh +++ b/src/deploy/carvel/add-local-registry-secret.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") function check_env() { eval ev='$'$1 diff --git a/src/deploy/carvel/carvel-add-registry-secret.sh b/src/deploy/carvel/carvel-add-registry-secret.sh index 9bd96a222a..5a1caa948f 100755 --- a/src/deploy/carvel/carvel-add-registry-secret.sh +++ b/src/deploy/carvel/carvel-add-registry-secret.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") function check_env() { eval ev='$'$1 diff --git a/src/deploy/carvel/carvel-deploy-package.sh b/src/deploy/carvel/carvel-deploy-package.sh index 76f0605a8c..901561ac12 100755 --- a/src/deploy/carvel/carvel-deploy-package.sh +++ b/src/deploy/carvel/carvel-deploy-package.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") function check_env() { eval ev='$'$1 diff --git a/src/deploy/carvel/carvel-prepare-namespaces.sh b/src/deploy/carvel/carvel-prepare-namespaces.sh index 66ec8c17b9..087d51e766 100755 --- a/src/deploy/carvel/carvel-prepare-namespaces.sh +++ b/src/deploy/carvel/carvel-prepare-namespaces.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") function check_env() { diff --git a/src/deploy/carvel/carvel-use-template.sh b/src/deploy/carvel/carvel-use-template.sh index 379f4b956e..47488ac46c 100755 --- a/src/deploy/carvel/carvel-use-template.sh +++ b/src/deploy/carvel/carvel-use-template.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") if [ "$SCDF_TYPE" = "" ]; then diff --git a/src/deploy/carvel/configure-database.sh b/src/deploy/carvel/configure-database.sh index 103f922356..5937dc9308 100755 --- a/src/deploy/carvel/configure-database.sh +++ b/src/deploy/carvel/configure-database.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") if [ "$DEBUG" == "true" ]; then echo "DEBUG: configure-database.sh $*" diff --git a/src/deploy/carvel/delete-scdf.sh b/src/deploy/carvel/delete-scdf.sh index 4c4761728f..c55fd9542f 100755 --- a/src/deploy/carvel/delete-scdf.sh +++ b/src/deploy/carvel/delete-scdf.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") function check_env() { eval ev='$'$1 diff --git a/src/deploy/carvel/deploy-local-broker.sh b/src/deploy/carvel/deploy-local-broker.sh index c302e78aaf..c75b320fa7 100755 --- a/src/deploy/carvel/deploy-local-broker.sh +++ b/src/deploy/carvel/deploy-local-broker.sh @@ -5,7 +5,10 @@ end="\033[0m" function count_kind() { jq --arg kind $1 --arg name $2 '.items | .[] | select(.kind == $kind) | .metadata | select(.name == $name) | .name' | grep -c -F "$2" } - +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") if [ "$BROKER" = "" ]; then echo "BROKER must be defined" diff --git a/src/deploy/carvel/deploy-local-database.sh b/src/deploy/carvel/deploy-local-database.sh index 52edba474a..0887a65036 100755 --- a/src/deploy/carvel/deploy-local-database.sh +++ b/src/deploy/carvel/deploy-local-database.sh @@ -2,6 +2,10 @@ bold="\033[1m" dim="\033[2m" end="\033[0m" +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") start_time=$(date +%s) if [ "$1" = "" ]; then diff --git a/src/deploy/carvel/deploy-local-prometheus.sh b/src/deploy/carvel/deploy-local-prometheus.sh index a559ac94d2..7ced670194 100755 --- a/src/deploy/carvel/deploy-local-prometheus.sh +++ b/src/deploy/carvel/deploy-local-prometheus.sh @@ -2,6 +2,10 @@ bold="\033[1m" dim="\033[2m" end="\033[0m" +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") start_time=$(date +%s) K8S=$(realpath $SCDIR/../kubernetes) diff --git a/src/deploy/carvel/deploy-scdf.sh b/src/deploy/carvel/deploy-scdf.sh index 3f7d64a657..aa3c8371fc 100755 --- a/src/deploy/carvel/deploy-scdf.sh +++ b/src/deploy/carvel/deploy-scdf.sh @@ -19,7 +19,10 @@ fi check_env NS check_env PACKAGE_VERSION check_env SCDF_TYPE - +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") start_time=$(date +%s) # the following names are your choice. diff --git a/src/deploy/carvel/load-images.sh b/src/deploy/carvel/load-images.sh index 0a5f02b007..525e0b1090 100755 --- a/src/deploy/carvel/load-images.sh +++ b/src/deploy/carvel/load-images.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") PROMETHEUS=$(yq ".scdf.feature.monitoring.prometheusRsocketProxy.enabled" ./scdf-values.yml) if [ "$PROMETHEUS" == "null" ]; then diff --git a/src/deploy/carvel/prepare-local-namespace.sh b/src/deploy/carvel/prepare-local-namespace.sh index 73c213358b..a4795b7553 100755 --- a/src/deploy/carvel/prepare-local-namespace.sh +++ b/src/deploy/carvel/prepare-local-namespace.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") function check_env() { diff --git a/src/deploy/carvel/register-apps.sh b/src/deploy/carvel/register-apps.sh index 7a2e621e25..21026d1849 100755 --- a/src/deploy/carvel/register-apps.sh +++ b/src/deploy/carvel/register-apps.sh @@ -2,6 +2,10 @@ bold="\033[1m" dim="\033[2m" end="\033[0m" +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") start_time=$(date +%s) function register_app() { diff --git a/src/deploy/carvel/setup-scdf-repo.sh b/src/deploy/carvel/setup-scdf-repo.sh index f12523614e..75c82eab73 100755 --- a/src/deploy/carvel/setup-scdf-repo.sh +++ b/src/deploy/carvel/setup-scdf-repo.sh @@ -13,7 +13,10 @@ function check_env() { function count_kind() { jq --arg kind $1 --arg name $2 '.items | .[] | select(.kind == $kind) | .metadata | select(.name == $name) | .name' | grep -c -F "$2" } - +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") start_time=$(date +%s) # the following names are your choice. diff --git a/src/deploy/carvel/start-deploy.sh b/src/deploy/carvel/start-deploy.sh index fc1b411e21..6c864b98b0 100755 --- a/src/deploy/carvel/start-deploy.sh +++ b/src/deploy/carvel/start-deploy.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") bold="\033[1m" dim="\033[2m" diff --git a/src/deploy/carvel/update-scdf.sh b/src/deploy/carvel/update-scdf.sh index 16f6c128d1..121bd6796c 100755 --- a/src/deploy/carvel/update-scdf.sh +++ b/src/deploy/carvel/update-scdf.sh @@ -2,6 +2,10 @@ bold="\033[1m" dim="\033[2m" end="\033[0m" +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") start_time=$(date +%s) # the following names are your choice. diff --git a/src/deploy/images/build-app-images.sh b/src/deploy/images/build-app-images.sh index 2d89cf6548..52ce63f806 100755 --- a/src/deploy/images/build-app-images.sh +++ b/src/deploy/images/build-app-images.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") ROOTDIR=$(realpath "$SCDIR/../..") set -e diff --git a/src/deploy/images/build-ctr-image.sh b/src/deploy/images/build-ctr-image.sh index 1fb8d5a238..a236d744e8 100755 --- a/src/deploy/images/build-ctr-image.sh +++ b/src/deploy/images/build-ctr-image.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") -./mvnw -o -am -pl :spring-cloud-dataflow-composed-task-runner install -DskipTests -T 0.5C -./mvnw -o -pl :spring-cloud-dataflow-composed-task-runner spring-boot:build-image -DskipTests +$SCDIR/mvnw -o -am -pl :spring-cloud-dataflow-composed-task-runner install -DskipTests -T 0.5C +$SCDIR/mvnw -o -pl :spring-cloud-dataflow-composed-task-runner spring-boot:build-image -DskipTests diff --git a/src/deploy/images/build-dataflow-image.sh b/src/deploy/images/build-dataflow-image.sh index ab8d70eb67..bb66c5786d 100755 --- a/src/deploy/images/build-dataflow-image.sh +++ b/src/deploy/images/build-dataflow-image.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") -./mvnw -o -am -pl :spring-cloud-dataflow-server install -DskipTests -T 0.5C -./mvnw -o -pl :spring-cloud-dataflow-server spring-boot:build-image -DskipTests +$SCDIR/mvnw -o -am -pl :spring-cloud-dataflow-server install -DskipTests -T 0.5C +$SCDIR/mvnw -o -pl :spring-cloud-dataflow-server spring-boot:build-image -DskipTests diff --git a/src/deploy/images/build-grafana-image.sh b/src/deploy/images/build-grafana-image.sh index 80fd4474ba..df5fa0c9ff 100755 --- a/src/deploy/images/build-grafana-image.sh +++ b/src/deploy/images/build-grafana-image.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") PROJECT_DIR=$(realpath $SCDIR/../../..) pushd $PROJECT_DIR || exit diff --git a/src/deploy/images/build-scdf-pro-image.sh b/src/deploy/images/build-scdf-pro-image.sh index bf689d3dfa..fc81ba94e7 100755 --- a/src/deploy/images/build-scdf-pro-image.sh +++ b/src/deploy/images/build-scdf-pro-image.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") ROOTDIR=$(realpath $(pwd)) ./mvnw -o -am -pl :spring-cloud-starter-dataflow-server install -DskipTests diff --git a/src/deploy/images/build-skipper-image.sh b/src/deploy/images/build-skipper-image.sh index f6fc1778bd..ca27954e89 100755 --- a/src/deploy/images/build-skipper-image.sh +++ b/src/deploy/images/build-skipper-image.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") ./mvnw -T 0.5C -o -am -pl :spring-cloud-skipper-server install -DskipTests ./mvnw -o -pl :spring-cloud-skipper-server spring-boot:build-image -DskipTests diff --git a/src/deploy/images/build-skipper-pro-image.sh b/src/deploy/images/build-skipper-pro-image.sh index ea9aac3d9c..7a1f72035f 100755 --- a/src/deploy/images/build-skipper-pro-image.sh +++ b/src/deploy/images/build-skipper-pro-image.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") ROOTDIR=$(realpath $(pwd)) ./mvnw -o -am -pl :spring-cloud-starter-dataflow-server install -DskipTests diff --git a/src/deploy/images/build-ssb-image.sh b/src/deploy/images/build-ssb-image.sh index 09c9fbee91..16b329c88b 100755 --- a/src/deploy/images/build-ssb-image.sh +++ b/src/deploy/images/build-ssb-image.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") ./mvnw -o -am -pl :spring-cloud-dataflow-single-step-batch-job install -DskipTests -T 0.5C ./mvnw -o -pl :spring-cloud-dataflow-single-step-batch-job spring-boot:build-image -DskipTests diff --git a/src/deploy/k8s/configure-k8s.sh b/src/deploy/k8s/configure-k8s.sh index d59b1b6552..fae81e5004 100755 --- a/src/deploy/k8s/configure-k8s.sh +++ b/src/deploy/k8s/configure-k8s.sh @@ -9,6 +9,10 @@ if [ "$NS" = "" ]; then exit 2 fi start_time=$(date +%s) +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") set -e if [ "$K8S_DRIVER" = "" ]; then diff --git a/src/deploy/k8s/delete-scdf.sh b/src/deploy/k8s/delete-scdf.sh index cb5a00e07f..e564d03232 100755 --- a/src/deploy/k8s/delete-scdf.sh +++ b/src/deploy/k8s/delete-scdf.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") $SCDIR/delete-k8s-ns.sh $NS diff --git a/src/deploy/k8s/deploy-scdf.sh b/src/deploy/k8s/deploy-scdf.sh index 431dfc20a5..87c8ae2274 100755 --- a/src/deploy/k8s/deploy-scdf.sh +++ b/src/deploy/k8s/deploy-scdf.sh @@ -3,6 +3,10 @@ if [ "$NS" = "" ]; then echo "NS not defined" >&2 exit 0 fi +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") K8S=$(realpath $SCDIR/../kubernetes) if [ ! -d "$K8S" ]; then diff --git a/src/deploy/k8s/destroy-k8s.sh b/src/deploy/k8s/destroy-k8s.sh index d8314bae6f..581dae0c29 100755 --- a/src/deploy/k8s/destroy-k8s.sh +++ b/src/deploy/k8s/destroy-k8s.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") kubectl_pid=$(ps aux | grep 'kubectl' | grep 'port\-forward' | awk '{print $2}') if [ "$kubectl_pid" != "" ] diff --git a/src/deploy/k8s/export-http-url.sh b/src/deploy/k8s/export-http-url.sh index b8dceb24cc..b946eadf07 100755 --- a/src/deploy/k8s/export-http-url.sh +++ b/src/deploy/k8s/export-http-url.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") PARENT=$(realpath "$SCDIR/../../..") if [ "$DATAFLOW_IP" = "" ]; then diff --git a/src/deploy/k8s/forward-scdf.sh b/src/deploy/k8s/forward-scdf.sh index 7fe18ca9da..1c0d876dd9 100755 --- a/src/deploy/k8s/forward-scdf.sh +++ b/src/deploy/k8s/forward-scdf.sh @@ -1,6 +1,9 @@ #!/bin/bash (return 0 2>/dev/null) && sourced=1 || sourced=0 - +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 0 +fi FWSCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") SC_PATH=$(realpath $FWSCDIR) set -e diff --git a/src/deploy/k8s/install-scdf.sh b/src/deploy/k8s/install-scdf.sh index f18d92b0f3..b9ec7919d5 100755 --- a/src/deploy/k8s/install-scdf.sh +++ b/src/deploy/k8s/install-scdf.sh @@ -4,6 +4,10 @@ if [ "$NS" = "" ]; then exit 2 fi start_time=$(date +%s) +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") LS_DIR=$(realpath $SCDIR) K8S_PATH="$LS_DIR/yaml" diff --git a/src/deploy/k8s/load-images.sh b/src/deploy/k8s/load-images.sh index 8e33e16e32..68f91defb1 100755 --- a/src/deploy/k8s/load-images.sh +++ b/src/deploy/k8s/load-images.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") case $BROKER in "" | "kafka") diff --git a/src/deploy/k8s/register-apps.sh b/src/deploy/k8s/register-apps.sh index 69302be49c..d8f33a8f70 100755 --- a/src/deploy/k8s/register-apps.sh +++ b/src/deploy/k8s/register-apps.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") set -e function dataflow_post() { diff --git a/src/deploy/k8s/setup-metallb.sh b/src/deploy/k8s/setup-metallb.sh index b91b4b1a12..4115349667 100755 --- a/src/deploy/k8s/setup-metallb.sh +++ b/src/deploy/k8s/setup-metallb.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") SCDIR=$(realpath $SCDIR) echo "Deploying Metal LoadBalancer" diff --git a/src/deploy/k8s/update-scdf.sh b/src/deploy/k8s/update-scdf.sh index d5fb4a31db..b368478cf1 100755 --- a/src/deploy/k8s/update-scdf.sh +++ b/src/deploy/k8s/update-scdf.sh @@ -3,6 +3,10 @@ if [ "$NS" = "" ]; then echo "NS not defined" >&2 exit 0 fi +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 1 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") PARENT=$(realpath "$SCDIR/../../..") if [ "$DATAFLOW_PRO_VERSION" = "" ]; then diff --git a/src/deploy/k8s/use-gke.sh b/src/deploy/k8s/use-gke.sh index abf3c95762..069891df54 100755 --- a/src/deploy/k8s/use-gke.sh +++ b/src/deploy/k8s/use-gke.sh @@ -1,10 +1,14 @@ #!/bin/bash -SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") (return 0 2>/dev/null) && sourced=1 || sourced=0 if [ "$sourced" = "0" ]; then echo "This script must be invoked using: source $0 $*" exit 1 fi +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 0 +fi +SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") function usage() { echo "Usage $0 [namespace]" } diff --git a/src/deploy/k8s/use-kind.sh b/src/deploy/k8s/use-kind.sh index 3a3e368069..d68cb1db08 100755 --- a/src/deploy/k8s/use-kind.sh +++ b/src/deploy/k8s/use-kind.sh @@ -4,6 +4,10 @@ if [ "$sourced" = "0" ]; then echo "This script must be invoked using: source $0 $*" exit 1 fi +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 0 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") SCDIR=$(realpath $SCDIR) source $SCDIR/use-mk.sh kind $* diff --git a/src/deploy/k8s/use-microk8s.sh b/src/deploy/k8s/use-microk8s.sh index 523bf5b021..bdd2d83483 100755 --- a/src/deploy/k8s/use-microk8s.sh +++ b/src/deploy/k8s/use-microk8s.sh @@ -5,6 +5,10 @@ if [ "$sourced" = "0" ]; then echo "This script must be invoked using: source $0 $*" exit 1 fi +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 0 +fi microk8s status mkdir -p $HOME/.kube microk8s config > $HOME/.kube/config diff --git a/src/deploy/k8s/use-mk-docker.sh b/src/deploy/k8s/use-mk-docker.sh index 989c00e9af..870436686a 100755 --- a/src/deploy/k8s/use-mk-docker.sh +++ b/src/deploy/k8s/use-mk-docker.sh @@ -4,6 +4,10 @@ if [ "$sourced" = "0" ]; then echo "This script must be invoked using: source $0 $*" exit 1 fi +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 0 +fi SCDIR=$(readlink -f "${BASH_SOURCE[0]}") SCDIR=$(dirname "$SCDIR") SCDIR=$(realpath $SCDIR) diff --git a/src/deploy/k8s/use-mk-kvm2.sh b/src/deploy/k8s/use-mk-kvm2.sh index bf8bbb2a7b..d7fa139b65 100755 --- a/src/deploy/k8s/use-mk-kvm2.sh +++ b/src/deploy/k8s/use-mk-kvm2.sh @@ -4,6 +4,10 @@ if [ "$sourced" = "0" ]; then echo "This script must be invoked using: source $0 $*" exit 1 fi +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 0 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") SCDIR=$(realpath $SCDIR) source $SCDIR/use-mk.sh kvm2 $* diff --git a/src/deploy/k8s/use-mk.sh b/src/deploy/k8s/use-mk.sh index 6d71fa234e..86a2ff4bc2 100755 --- a/src/deploy/k8s/use-mk.sh +++ b/src/deploy/k8s/use-mk.sh @@ -5,6 +5,10 @@ if [ "$sourced" = "0" ]; then echo "This script must be invoked using: source $0 $*" exit 1 fi +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 0 +fi if [ "$1" = "" ]; then echo "Arguments [--namespace ] [database] [broker] [--pro] [--skip-reg] [--release] [--snapshot] [--milestone]" echo "Driver must be one of kind, Or a valid driver for minikube like kvm2, docker, vmware, virtualbox, podman, vmwarefusion, hyperkit" diff --git a/src/deploy/k8s/use-tmc.sh b/src/deploy/k8s/use-tmc.sh index ec6f94994b..17015c3022 100755 --- a/src/deploy/k8s/use-tmc.sh +++ b/src/deploy/k8s/use-tmc.sh @@ -5,6 +5,10 @@ if [ "$sourced" = "0" ]; then echo "This script must be invoked using: source $0 $*" exit 1 fi +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 0 +fi export K8S_DRIVER=tmc if [ "$1" = "" ]; then echo "Expected parameter providing TMC cluster" diff --git a/src/deploy/shell/build-shell.sh b/src/deploy/shell/build-shell.sh index 18b0327858..0324f4af04 100755 --- a/src/deploy/shell/build-shell.sh +++ b/src/deploy/shell/build-shell.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 0 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") ./mvnw -o -am -pl :spring-cloud-dataflow-shell install -DskipTests -T 0.5C DATAFLOW_VERSION=$(./mvnw exec:exec -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive -q | sed 's/\"//g' | sed 's/version=//g') diff --git a/src/deploy/shell/deploy-ctr.sh b/src/deploy/shell/deploy-ctr.sh index 46bee2d3e7..525ad4eeb3 100755 --- a/src/deploy/shell/deploy-ctr.sh +++ b/src/deploy/shell/deploy-ctr.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash +if [ -z "$BASH_VERSION" ]; then + echo "This script requires Bash. Use: bash $0 $*" + exit 0 +fi SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") cat > $SCDIR/deploy-ctr.shell < $SCDIR/deploy-ctr3a.shell < $SCDIR/deploy-ctr3b.shell < $SCDIR/deploy-task-demo-metrics-prometheus.shell < deploy-timelogger.shell < deploy-ts-batch.shell < deploy-ts-batch3.shell < deploy-ts-task.shell < deploy-ts-task3.shell < $SCDIR/register-apps.shell < run-ctr.shell < run-ctr3a.shell < run-ctr3b.shell < run-task-demo-metrics-prometheus.shell < run-timelogger.shell < run-ts-batch.shell < run-ts-batch3.shell < run-ts-task.shell < run-ts-task3.shell <