mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-02 19:21:15 -03:00
There are reasons to use bash, `hash` is not one of them, as `command -v` is perfectly capable and in POSIX. [ci skip]
18 lines
391 B
Bash
Executable File
18 lines
391 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ "$#" -ne 1 ]; then
|
|
echo "Usage: driver.sh /path/to/fish"
|
|
fi
|
|
|
|
FISH_PATH=$1
|
|
BENCHMARKS_DIR=$(dirname "$0")/benchmarks
|
|
|
|
for benchmark in "$BENCHMARKS_DIR"/*; do
|
|
echo $(basename "$benchmark")
|
|
${FISH_PATH} --print-rusage-self $benchmark > /dev/null
|
|
if command -v hyperfine >/dev/null 2>&1; then
|
|
hyperfine "${FISH_PATH} $benchmark > /dev/null"
|
|
fi
|
|
done
|
|
|