mirror of
https://github.com/denisidoro/navi
synced 2024-11-22 03:23:05 +00:00
16 lines
325 B
Bash
Executable file
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
|