navi/scripts/run

17 lines
325 B
Text
Raw Normal View History

2020-03-04 21:01:23 +00:00
#!/usr/bin/env bash
set -euo pipefail
export NAVI_HOME="$(cd "$(dirname "$0")/.." && pwd)"
cd "$NAVI_HOME"
2021-04-19 12:54:35 +00:00
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