diff options
author | Ethan P <32112321+eth-p@users.noreply.github.com> | 2020-10-04 13:49:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-04 13:49:50 -0700 |
commit | 3af7a6b082f471207474b34824789816ee2ddbf3 (patch) | |
tree | db7efb771a395f963a15300418d57aed3d357158 /tests | |
parent | 2e985198c6e25456332d1f037c59b3bb3755e3ac (diff) | |
parent | 12340c1d10659df2f1b84a7040fa293b6b853b76 (diff) |
Merge pull request #1226 from mdevlamynck/fix-scripts
Shell script improvements
Diffstat (limited to 'tests')
-rwxr-xr-x[-rw-r--r--] | tests/benchmarks/comparison.sh | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | tests/benchmarks/run-benchmarks.sh | 4 | ||||
-rwxr-xr-x | tests/syntax-tests/regression_test.sh | 2 | ||||
-rwxr-xr-x | tests/syntax-tests/update.sh | 4 |
4 files changed, 10 insertions, 4 deletions
diff --git a/tests/benchmarks/comparison.sh b/tests/benchmarks/comparison.sh index 50438cf4..c9eb5237 100644..100755 --- a/tests/benchmarks/comparison.sh +++ b/tests/benchmarks/comparison.sh @@ -1,4 +1,6 @@ -#!/bin/bash +#!/usr/bin/env bash + +cd "$(dirname "${BASH_SOURCE[0]}")" if ! which hyperfine > /dev/null 2>&1; then echo "'hyperfine' does not seem to be installed." diff --git a/tests/benchmarks/run-benchmarks.sh b/tests/benchmarks/run-benchmarks.sh index 252c3008..c3a15509 100644..100755 --- a/tests/benchmarks/run-benchmarks.sh +++ b/tests/benchmarks/run-benchmarks.sh @@ -1,4 +1,6 @@ -#!/bin/bash +#!/usr/bin/env bash + +cd "$(dirname "${BASH_SOURCE[0]}")" if ! which hyperfine > /dev/null 2>&1; then echo "'hyperfine' does not seem to be installed." diff --git a/tests/syntax-tests/regression_test.sh b/tests/syntax-tests/regression_test.sh index 55e398c4..25acb256 100755 --- a/tests/syntax-tests/regression_test.sh +++ b/tests/syntax-tests/regression_test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eou pipefail diff --git a/tests/syntax-tests/update.sh b/tests/syntax-tests/update.sh index 7ce66588..b4752f05 100755 --- a/tests/syntax-tests/update.sh +++ b/tests/syntax-tests/update.sh @@ -1,4 +1,6 @@ -#!/bin/bash +#!/usr/bin/env bash + +cd "$(dirname "${BASH_SOURCE[0]}")" python="python3" if ! command -v python3 &>/dev/null; then python="python"; fi |