1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-18 02:20:09 +00:00

feat(asdf): add support for archlinux/AUR package (#9893)

Closes #9893
This commit is contained in:
alexandregv 2021-05-06 19:02:37 +02:00 committed by Marc Cornellà
parent bd0b4b64c6
commit 6babcbd884
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B

View file

@ -2,6 +2,12 @@
ASDF_DIR="${ASDF_DIR:-$HOME/.asdf}" ASDF_DIR="${ASDF_DIR:-$HOME/.asdf}"
ASDF_COMPLETIONS="$ASDF_DIR/completions" ASDF_COMPLETIONS="$ASDF_DIR/completions"
# If not found, check for archlinux/AUR package (/opt/asdf-vm/)
if [[ ! -f "$ASDF_DIR/asdf.sh" || ! -f "$ASDF_COMPLETIONS/asdf.bash" ]] && [[ -f "/opt/asdf-vm/asdf.sh" ]]; then
ASDF_DIR="/opt/asdf-vm"
ASDF_COMPLETIONS="$ASDF_DIR"
fi
# If not found, check for Homebrew package # If not found, check for Homebrew package
if [[ ! -f "$ASDF_DIR/asdf.sh" || ! -f "$ASDF_COMPLETIONS/asdf.bash" ]] && (( $+commands[brew] )); then if [[ ! -f "$ASDF_DIR/asdf.sh" || ! -f "$ASDF_COMPLETIONS/asdf.bash" ]] && (( $+commands[brew] )); then
brew_prefix="$(brew --prefix asdf)" brew_prefix="$(brew --prefix asdf)"