feat: check for pre-existing autojump install

This commit is contained in:
Price Hiller 2022-07-31 20:44:23 -05:00
parent 0363c340fc
commit 7a099ae010

View File

@ -131,6 +131,7 @@ install-cargo-binary() {
install-autojump() {
local install_path="${1}/autojump"
if ! [[ -e "${install_path}" ]]; then
cd "$(mktemp -d)"
git clone "https://github.com/wting/autojump.git" "autojump" || return 1
(
@ -139,6 +140,9 @@ install-autojump() {
sed -i "s/\#\!\/usr\/bin\/env\ python/\#\!\/usr\/bin\/env\ python3/" \
"${install_path}/bin/autojump"
) || return 1
else
log "info" "${GREEN}Autojump${RESET_BOLD} already installed, skipping"
fi
}