We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8e47cc commit bf87a38Copy full SHA for bf87a38
bench
@@ -1,11 +1,17 @@
1
-#!/bin/sh
+#!/bin/bash
2
# bench: CLI wrapper for the benchmarking tool
3
4
-# Get the directory where this script is located
5
-DIR="$(cd "$(dirname "$0")" && pwd)"
+# Resolve the real path of the script, following symlinks
+SOURCE="${BASH_SOURCE[0]:-$0}"
6
+while [ -h "$SOURCE" ]; do
7
+ DIR="$(cd -P "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd)"
8
+ SOURCE="$(readlink "$SOURCE")"
9
+ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
10
+done
11
+DIR="$(cd -P "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd)"
12
13
# Activate the virtual environment
14
. "$DIR/venv/bin/activate"
15
-# Run the benchmark (pass along any CLI args)
-python "$DIR/main.py" "$@"
16
+# Run the benchmark
17
+python "$DIR/main.py" "$@"
0 commit comments