mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 13:01:21 -03:00
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:
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
if [ "$#" -ne 1 ]; then
|
if [ "$#" -ne 1 ]; then
|
||||||
echo "Usage: driver.sh /path/to/fish"
|
echo "Usage: driver.sh /path/to/fish"
|
||||||
@@ -10,7 +10,7 @@ BENCHMARKS_DIR=$(dirname "$0")/benchmarks
|
|||||||
for benchmark in "$BENCHMARKS_DIR"/*; do
|
for benchmark in "$BENCHMARKS_DIR"/*; do
|
||||||
echo $(basename "$benchmark")
|
echo $(basename "$benchmark")
|
||||||
${FISH_PATH} --print-rusage-self $benchmark > /dev/null
|
${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"
|
hyperfine "${FISH_PATH} $benchmark > /dev/null"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user