2019-09-24 19:13:57 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
|
2020-03-04 21:01:23 +00:00
|
|
|
export NAVI_HOME="$(cd "$(dirname "$0")/.." && pwd)"
|
2019-09-24 19:13:57 +00:00
|
|
|
|
2021-04-19 12:54:35 +00:00
|
|
|
_start() {
|
|
|
|
cd "$NAVI_HOME"
|
2019-09-24 19:13:57 +00:00
|
|
|
|
2021-04-19 12:54:35 +00:00
|
|
|
./scripts/release x86_64-unknown-linux-musl
|
2020-03-24 14:42:18 +00:00
|
|
|
|
2021-04-19 12:54:35 +00:00
|
|
|
docker run \
|
|
|
|
-e HOMEBREW_NO_AUTO_UPDATE=1 \
|
|
|
|
-e HOMEBREW_NO_INSTALL_CLEANUP=1 \
|
|
|
|
-v "$(pwd):/navi" \
|
|
|
|
-it 'bashell/alpine-bash' \
|
|
|
|
bash -c '/navi/scripts docker setup; exec bash'
|
|
|
|
}
|
|
|
|
|
|
|
|
_setup() {
|
|
|
|
apk add git
|
|
|
|
apk add curl
|
|
|
|
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
|
|
|
|
ln -s /navi/target/debug/navi /usr/local/bin/navi
|
|
|
|
}
|
|
|
|
|
|
|
|
main() {
|
|
|
|
local -r fn="$1"
|
|
|
|
shift || true
|
|
|
|
"_${fn}" "$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
main "$@"
|