2020-03-04 21:01:23 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
##? make install
|
|
|
|
##? make uninstall
|
|
|
|
|
|
|
|
export NAVI_HOME="$(cd "$(dirname "$0")/.." && pwd)"
|
|
|
|
source "${NAVI_HOME}/scripts/install"
|
|
|
|
|
|
|
|
install() {
|
2021-04-19 21:07:16 +00:00
|
|
|
cargo install --path .
|
2020-03-04 21:01:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uninstall() {
|
2021-04-19 21:07:16 +00:00
|
|
|
cargo uninstall
|
2021-04-19 12:54:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fix() {
|
|
|
|
"${NAVI_HOME}/scripts/fix"
|
2020-03-04 21:01:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
cmd="$1"
|
|
|
|
shift
|
|
|
|
|
2021-04-19 12:54:35 +00:00
|
|
|
export X_MODE=true
|
|
|
|
set -x
|
|
|
|
|
2020-03-04 21:01:23 +00:00
|
|
|
case "$cmd" in
|
2020-03-11 14:30:25 +00:00
|
|
|
"install") install "$@" ;;
|
|
|
|
"uninstall") uninstall "$@" ;;
|
2021-04-19 12:54:35 +00:00
|
|
|
"fix") fix "$@" ;;
|
2020-03-04 21:01:23 +00:00
|
|
|
esac
|