Skip to content

Commit

Permalink
Use /usr/bin/env for scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Jul 31, 2024
1 parent 3ca9a69 commit 236b72d
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion tests/reconfig/scripts/create-resources-gw-last.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

num_namespaces=$1

Expand Down
2 changes: 1 addition & 1 deletion tests/reconfig/scripts/create-resources-routes-last.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

num_namespaces=$1

Expand Down
2 changes: 1 addition & 1 deletion tests/reconfig/scripts/delete-multiple.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

num_namespaces=$1

Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/add-local-ip-auth-networks.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

source scripts/vars.env

Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/check-pod-exit-code.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

CODE=$(kubectl get pod conformance -o jsonpath='{.status.containerStatuses[].state.terminated.exitCode}')
if [ $CODE -ne 0 ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/cleanup-router.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

source scripts/vars.env

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

source scripts/vars.env

Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/create-and-setup-gcp-vm.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/create-gke-cluster.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

source scripts/vars.env

Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/create-gke-router.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

source scripts/vars.env

Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/delete-gke-cluster.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

source scripts/vars.env

Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/remote-scripts/run-nfr-tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

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

set -e

Expand Down
3 changes: 1 addition & 2 deletions tests/scripts/run-tests-gcp-vm.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

Expand All @@ -14,7 +14,6 @@ gcloud compute scp --zone ${GKE_CLUSTER_ZONE} --project=${GKE_PROJECT} ${SCRIPT_
gcloud compute ssh --zone ${GKE_CLUSTER_ZONE} --project=${GKE_PROJECT} username@${RESOURCE_NAME} \
--command="export START_LONGEVITY=${START_LONGEVITY} &&\
export STOP_LONGEVITY=${STOP_LONGEVITY} &&\
source /etc/profile &&\
bash -s" < ${SCRIPT_DIR}/remote-scripts/${SCRIPT}; retcode=$?

if [ $retcode -ne 0 ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/sync-files-to-vm.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

source scripts/vars.env

Expand Down
2 changes: 1 addition & 1 deletion tests/suite/scripts/longevity-wrk.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

SVC_IP=$(kubectl -n nginx-gateway get svc ngf-longevity-nginx-gateway-fabric -o jsonpath='{.status.loadBalancer.ingress[0].ip}')

Expand Down

0 comments on commit 236b72d

Please sign in to comment.