navi/scripts/run
2021-04-19 09:54:35 -03:00

16 lines
325 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
export NAVI_HOME="$(cd "$(dirname "$0")/.." && pwd)"
cd "$NAVI_HOME"
if command_exists navi; then
navi "$@"
elif [ -f "./target/release/navi" ]; then
"./target/release/navi" "$@"
elif [ -f "./target/debug/navi" ]; then
"./target/debug/navi" "$@"
else
cargo run -- "$@"
fi