feat: check for pre-existing autojump install
This commit is contained in:
parent
0363c340fc
commit
7a099ae010
20
install.bash
20
install.bash
@ -131,14 +131,18 @@ install-cargo-binary() {
|
|||||||
|
|
||||||
install-autojump() {
|
install-autojump() {
|
||||||
local install_path="${1}/autojump"
|
local install_path="${1}/autojump"
|
||||||
cd "$(mktemp -d)"
|
if ! [[ -e "${install_path}" ]]; then
|
||||||
git clone "https://github.com/wting/autojump.git" "autojump" || return 1
|
cd "$(mktemp -d)"
|
||||||
(
|
git clone "https://github.com/wting/autojump.git" "autojump" || return 1
|
||||||
cd "autojump"
|
(
|
||||||
python3 "install.py" -d "${install_path}"
|
cd "autojump"
|
||||||
sed -i "s/\#\!\/usr\/bin\/env\ python/\#\!\/usr\/bin\/env\ python3/" \
|
python3 "install.py" -d "${install_path}"
|
||||||
"${install_path}/bin/autojump"
|
sed -i "s/\#\!\/usr\/bin\/env\ python/\#\!\/usr\/bin\/env\ python3/" \
|
||||||
) || return 1
|
"${install_path}/bin/autojump"
|
||||||
|
) || return 1
|
||||||
|
else
|
||||||
|
log "info" "${GREEN}Autojump${RESET_BOLD} already installed, skipping"
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user