feat: add install for autojump

This commit is contained in:
Price Hiller 2022-07-31 00:36:04 -05:00
parent e56f5de52f
commit a7405831fd
2 changed files with 24 additions and 2 deletions

View File

@ -19,6 +19,9 @@ export PYENV_ROOT="${HOME}/.local/share/pyenv"
export PATH="${PATH}:${PYENV_ROOT}/bin"
eval "$(pyenv init -)"
### Autojump ###
source "${HOME}/.local/share/autojump/share/autojump/autojump.zsh"
### MAC ##
if [[ "$OSTYPE" = "darwin"* ]]; then
# Set Homebrew env variables

View File

@ -129,6 +129,16 @@ install-cargo-binary() {
}
install-autojump() {
local install_path="${1}/autojump"
git clone "https://github.com/wting/autojump.git" "${install_path}" || return 1
(
cd "${install_path}"
python3 "install.py"
) || return 1
}
check-script-deps() {
local commands_to_check=(
git
@ -284,9 +294,18 @@ main() {
log "info" "Installing ${GREEN}Pyenv${RESET_BOLD}"
if ! install-pyenv "${DEPS_PATH}"; then
log "info" "Failed to install ${GREEN}Pyenv${RESET_BOLD}"
log "error" "Failed to install ${GREEN}Pyenv${RESET_BOLD}"
exit 1
fi
log "info"
log "info" "Finished installing ${GREEN}Pyenv${RESET_BOLD}"
print-break
log "info" "Installing ${GREEN}autojump${RESET_BOLD}"
if ! install-autojump; then
log "error" "Failed to install ${GREEN}autojump${RESET_BOLD}"
exit 1
fi
log "info" "Finished installing ${GREEN}autojump${RESET_BOLD}"
log "info" "Install ${GREEN}Oh My ZSH${RESET_BOLD}"
install-omz "${DEPS_PATH}"