mirror of
https://github.com/denisidoro/navi
synced 2024-11-22 11:33:10 +00:00
34 lines
548 B
Bash
Executable file
34 lines
548 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
##? make install
|
|
##? make uninstall
|
|
|
|
export NAVI_HOME="$(cd "$(dirname "$0")/.." && pwd)"
|
|
source "${NAVI_HOME}/scripts/install"
|
|
|
|
install() {
|
|
"${NAVI_HOME}/scripts/action" release
|
|
ln -s "${NAVI_HOME}/target/tar/navi" "${BIN_DIR}/navi"
|
|
}
|
|
|
|
uninstall() {
|
|
rm -rf "${NAVI_HOME}/target"
|
|
rm -f "${BIN_DIR}/navi"
|
|
}
|
|
|
|
fix() {
|
|
"${NAVI_HOME}/scripts/fix"
|
|
}
|
|
|
|
cmd="$1"
|
|
shift
|
|
|
|
export X_MODE=true
|
|
set -x
|
|
|
|
case "$cmd" in
|
|
"install") install "$@" ;;
|
|
"uninstall") uninstall "$@" ;;
|
|
"fix") fix "$@" ;;
|
|
esac
|