From 9a3fb3e265a738eb8804e9d95c83a350df77b1da Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 27 Nov 2019 16:21:11 +0100 Subject: [PATCH] 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] --- benchmarks/driver.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmarks/driver.sh b/benchmarks/driver.sh index f2e0e45a6..77706f44e 100755 --- a/benchmarks/driver.sh +++ b/benchmarks/driver.sh @@ -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