mirror of
https://github.com/denisidoro/navi
synced 2024-11-26 05:20:21 +00:00
27 lines
549 B
Bash
Executable file
27 lines
549 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" /usr/bin/navi \
|
|
|| ln -s "${NAVI_HOME}/target/tar/navi" /usr/local/bin/navi
|
|
}
|
|
|
|
uninstall() {
|
|
rm -rf "${NAVI_HOME}/target"
|
|
rm /usr/local/bin/navi || rm /usr/bin/navi
|
|
}
|
|
|
|
cmd="$1"
|
|
shift
|
|
|
|
case "$cmd" in
|
|
"install") install "$@" ;;
|
|
"uninstall") uninstall "$@" ;;
|
|
esac
|