navi/scripts/make

35 lines
548 B
Plaintext
Raw Normal View History

2020-03-05 00:01:23 +03: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() {
2020-03-11 17:30:25 +03:00
"${NAVI_HOME}/scripts/action" release
ln -s "${NAVI_HOME}/target/tar/navi" "${BIN_DIR}/navi"
2020-03-05 00:01:23 +03:00
}
uninstall() {
2020-03-11 17:30:25 +03:00
rm -rf "${NAVI_HOME}/target"
2021-04-19 15:54:35 +03:00
rm -f "${BIN_DIR}/navi"
}
fix() {
"${NAVI_HOME}/scripts/fix"
2020-03-05 00:01:23 +03:00
}
cmd="$1"
shift
2021-04-19 15:54:35 +03:00
export X_MODE=true
set -x
2020-03-05 00:01:23 +03:00
case "$cmd" in
2020-03-11 17:30:25 +03:00
"install") install "$@" ;;
"uninstall") uninstall "$@" ;;
2021-04-19 15:54:35 +03:00
"fix") fix "$@" ;;
2020-03-05 00:01:23 +03:00
esac