Skip to content

Commit

Permalink
update shebang line of all scripts to be more compatible between *nix…
Browse files Browse the repository at this point in the history
… environments (#672)

Signed-off-by: Alice W <[email protected]>
Signed-off-by: Alexander Schwartz <[email protected]>
Co-authored-by: Alexander Schwartz <[email protected]>
  • Loading branch information
alice-wondered and ahus1 authored Jan 15, 2024
1 parent 7301069 commit e9a1796
Show file tree
Hide file tree
Showing 42 changed files with 55 additions and 44 deletions.
6 changes: 5 additions & 1 deletion ansible/aws_ec2.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/bin/bash +x
#!/usr/bin/env bash
set -e
cd $(dirname "${BASH_SOURCE[0]}")

if [[ "$RUNNER_DEBUG" == "1" ]]; then
set -x
fi

OPERATION=$1
REGION=$2

Expand Down
6 changes: 5 additions & 1 deletion ansible/benchmark.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/bin/bash +x
#!/usr/bin/env bash
set -e
cd $(dirname "${BASH_SOURCE[0]}")

if [[ "$RUNNER_DEBUG" == "1" ]]; then
set -x
fi

REGION=$1
KCB_PARAMS=${@:2}

Expand Down
3 changes: 2 additions & 1 deletion antora/author.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash
set -e
yarn install
yarn run author
3 changes: 2 additions & 1 deletion antora/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash
set -e
yarn install
yarn run build
6 changes: 3 additions & 3 deletions benchmark/src/main/content/bin/generate-custom-report.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
set -o pipefail
# set -x
Expand Down Expand Up @@ -30,7 +30,7 @@ function generate_report {
else
if ${USE_TEMPLATE}; then
echo "GENERATING THE HTML REPORT"
java -jar gatling-report-${GATLING_REPORT_VERSION}-fat.jar --template $TEMPLATE_PATH $SRC_DIR -o $TARGET_DIR -f
java -jar gatling-report-${GATLING_REPORT_VERSION}-fat.jar --template $TEMPLATE_PATH $SRC_DIR -o $TARGET_DIR -f
else
echo "GENERATING THE HTML REPORT"
java -jar gatling-report-${GATLING_REPORT_VERSION}-fat.jar $SRC_DIR -o $TARGET_DIR -f
Expand Down Expand Up @@ -76,4 +76,4 @@ shift $(( OPTIND -1 ))
#call the functions
pull_gatling_report_jar
generate_report
delete_gatling_report_jar
delete_gatling_report_jar
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
set -o pipefail
# set -x
Expand Down
2 changes: 1 addition & 1 deletion benchmark/src/main/content/bin/kc-chaos.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Use this for simulating failures of pods when testing Keycloak's capabilities to recover.
set -e

Expand Down
2 changes: 1 addition & 1 deletion benchmark/src/main/content/bin/kc-failover.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Script simulating different xsite failover scenarios
set -e

Expand Down
2 changes: 1 addition & 1 deletion benchmark/src/main/content/bin/kcb.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if [[ "$RUNNER_DEBUG" == "1" ]]; then
set -x
Expand Down
3 changes: 2 additions & 1 deletion dashbuilder/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash
set -e
yarn install
yarn run build
2 changes: 1 addition & 1 deletion dataset/dataset-import.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e
set -o pipefail
Expand Down
2 changes: 1 addition & 1 deletion kcb-ci-runner.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -euxo pipefail

export REPORTS_HOME=$USER_HOME/reports
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/aws_check_vpcs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if [[ "$RUNNER_DEBUG" == "1" ]]; then
set -x
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/aws_rotate_keycloak_master_password.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

source ./.env
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rds/aurora_cluster_reaper.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [[ "$RUNNER_DEBUG" == "1" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rds/aurora_common.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

export AURORA_CLUSTER=${AURORA_CLUSTER:-"keycloak"}
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rds/aurora_create.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [[ "$RUNNER_DEBUG" == "1" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rds/aurora_create_global_db.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [[ "$RUNNER_DEBUG" == "1" ]]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [[ "$RUNNER_DEBUG" == "1" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rds/aurora_create_peering_connection.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [[ "$RUNNER_DEBUG" == "1" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rds/aurora_delete.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [[ "$RUNNER_DEBUG" == "1" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rds/aurora_delete_global_db.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [[ "$RUNNER_DEBUG" == "1" ]]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [[ "$RUNNER_DEBUG" == "1" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rds/aurora_delete_peering_connection.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [[ "$RUNNER_DEBUG" == "1" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rds/aurora_endpoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [[ "$RUNNER_DEBUG" == "1" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rds/aurora_global_common.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

function arnToRegion() {
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rosa_cluster_reaper.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [ -f ./.env ]; then
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rosa_create_cluster.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [ -f ./.env ]; then
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rosa_delete_cluster.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [[ "$RUNNER_DEBUG" == "1" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rosa_describe.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail
if [[ "$#" -ne "1" ]]; then
echo "This describes one ROSA cluster in JSON, but only information that is not security related."
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rosa_efs_create.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# This automated the setup of EFS as a RWX storage in ROSA. It is based on the following information:
# * https://access.redhat.com/articles/6966373
# * https://mobb.ninja/docs/rosa/aws-efs/
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rosa_efs_delete.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# don't use 'set -e' here, as we want to cleanup also half-installed EFS setups

if [[ "$RUNNER_DEBUG" == "1" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rosa_efs_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Test is EFS is configured correctly, see
# * https://mobb.ninja/docs/rosa/aws-efs/
set -xeo pipefail
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rosa_install_certmanager_operator.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eo pipefail

Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rosa_install_cryotstat_operator.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eo pipefail

Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rosa_install_openshift_logging.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eo pipefail

Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rosa_machine_cidr.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [[ "$RUNNER_DEBUG" == "1" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rosa_oc_login.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [[ "$RUNNER_DEBUG" == "1" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rosa_recreate_admin.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [[ "$RUNNER_DEBUG" == "1" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion provision/infinispan/install_operator.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

INSTALL_NAMESPACE=${INSTALL_NAMESPACE:-"openshift-operators"}
OPERATOR_SOURCE=${OPERATOR_SOURCE:-"community-operators"}
Expand Down
2 changes: 1 addition & 1 deletion provision/minikube/init-database.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -euo pipefail

Expand Down
2 changes: 1 addition & 1 deletion provision/tlsdisableagent/buildtlsagent.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -euxo pipefail
cd java-instrumentation-tool
../../../mvnw clean package -B
Expand Down

0 comments on commit e9a1796

Please sign in to comment.