navi/scripts/install

15 lines
255 B
Text
Raw Normal View History

2019-09-20 17:01:12 +00:00
#!/usr/bin/env bash
set -euo pipefail
2019-10-11 17:33:16 +00:00
export NAVI_HOME="$(cd "$(dirname "$0")/.." && pwd)"
2019-09-20 17:01:12 +00:00
script() {
echo "#!/usr/bin/env bash"
2019-10-11 17:33:16 +00:00
echo "${NAVI_HOME}/navi" '"$@"'
2019-09-20 17:01:12 +00:00
}
folder="${1:-/usr/local/bin}"
bin="${folder}/navi"
script > "$bin"
chmod +x "$bin"