Use POSIX sh in the benchmark driver

There are reasons to use bash, `hash` is not one of them, as `command
-v` is perfectly capable and in POSIX.

[ci skip]
This commit is contained in:
Fabian Homborg 2019-11-27 16:21:11 +01:00
parent efe6fb3c3b
commit 9a3fb3e265

View file

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "Usage: driver.sh /path/to/fish"
@ -10,7 +10,7 @@ BENCHMARKS_DIR=$(dirname "$0")/benchmarks
for benchmark in "$BENCHMARKS_DIR"/*; do
echo $(basename "$benchmark")
${FISH_PATH} --print-rusage-self $benchmark > /dev/null
if hash hyperfine 2>/dev/null; then
if command -v hyperfine >/dev/null 2>&1; then
hyperfine "${FISH_PATH} $benchmark > /dev/null"
fi
done