From f8ec083c7e7f4cb6fa6ce39b66586b3e36b73f42 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sun, 31 Jul 2022 00:49:37 -0500 Subject: [PATCH] fix: properly handle python pathing --- install.bash | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/install.bash b/install.bash index 680b20c..631ae75 100644 --- a/install.bash +++ b/install.bash @@ -182,11 +182,15 @@ install-from-pkg-mngr() { install-pyenv() { local install_path="${1}/pyenv" - git clone https://github.com/pyenv/pyenv.git "${install_path}" || return 1 - ( - cd "${install_path}" - src/configure && make -C src - ) || return 1 + if ! [[ -e "${install_path}" ]]; then + git clone https://github.com/pyenv/pyenv.git "${install_path}" || return 1 + ( + cd "${install_path}" + src/configure && make -C src + ) || return 1 + else + log "info" "${GREEN}Pyenv${RESET_BOLD} already installed, skipping" + fi } create-dirs() { @@ -258,6 +262,11 @@ main() { log "info" "Finished creating directories" print-break + log "info" "Linking ${GREEN}python${RESET_BOLD} to ${GREEN}python3${RESET_BOLD}" + ln -s "$(command -v python3)" "${HOME}/.local/bin/python" + export PATH="${PATH}:${HOME}/.local/bin/" + log "info" "Finished linking ${GREEN}python${RESET_BOLD} to ${GREEN}python3${RESET_BOLD}" + log "info" "Installing ${GREEN}FZF${RESET_BOLD}" if ! install-fzf "${DEPS_PATH}"; then log "error" "Failed to install ${GREEN}FZF${RESET_BOLD}"