feat!: asdf is now a git submodule

This commit is contained in:
2024-07-16 22:58:29 +03:00
parent 64a626d5c4
commit fc16b8231e
6 changed files with 12 additions and 18 deletions

3
.gitmodules vendored
View File

@@ -64,3 +64,6 @@
[submodule "tmux/tmux-dark-notify"]
path = config/tmux/plugins/tmux-dark-notify
url = https://github.com/erikw/tmux-dark-notify.git
[submodule "asdf"]
path = local/bin/asdf
url = https://github.com/asdf-vm/asdf.git

View File

@@ -18,6 +18,8 @@ git submodule add --name cheat-community \
-f https://github.com/cheat/cheatsheets.git config/cheat/cheatsheets/community
git submodule add --name cheat-tldr \
-f https://github.com/ivuorinen/cheatsheet-tldr.git config/cheat/cheatsheets/tldr
git submodule add --name asdf \
-f https://github.com/asdf-vm/asdf.git local/bin/asdf
# tmux plugin manager and plugins
git submodule add --name tmux/tmux-continuum \

View File

@@ -16,8 +16,8 @@ x-have oh-my-posh && {
eval "$(oh-my-posh init bash --config "$DOTFILES/config/omp/own.toml")"
}
. "$HOME/.local/share/asdf/asdf.sh"
. "$HOME/.local/share/asdf/completions/asdf.bash"
. "$XDG_BIN_HOME/asdf/asdf.sh"
. "$XDG_BIN_HOME/asdf/completions/asdf.bash"
x-have antidot && {
eval "$(antidot init)"

View File

@@ -23,7 +23,7 @@ export ANDROID_HOME="$XDG_DATA_HOME/android"
# asdf
# https://github.com/asdf-vm/asdf
export ASDF_DIR="${XDG_DATA_HOME}/asdf"
export ASDF_DIR="${XDG_BIN_HOME}/asdf"
export ASDF_CONFIG_FILE="${XDG_CONFIG_HOME}/asdf/asdfrc"
export ASDF_DATA_DIR="${ASDF_DIR}"
# This seems wrong, but `asdf info` and `versions.bash` differ on path resolution.

1
local/bin/asdf Submodule

Submodule local/bin/asdf added at ccdd47df9b

View File

@@ -5,23 +5,11 @@
source "${XDG_CONFIG_HOME}/shared"
source "${DOTFILES}/scripts/shared.sh"
# Installation variables
ASDF_GIT="https://github.com/asdf-vm/asdf.git"
ASDF_PATH="${XDG_DATA_HOME}/asdf"
if [ ! -d "$ASDF_PATH" ]; then
git clone --depth 1 "$ASDF_GIT" "$ASDF_PATH" \
--branch v0.14.0
msg_done "asdf ($ASDF_PATH/) installed"
else
msg_done "asdf ($ASDF_PATH/) already installed"
fi
export PATH="${ASDF_PATH}/bin:$PATH"
export ASDF_DIR="${XDG_BIN_HOME}/asdf"
export PATH="${ASDF_DIR}/bin:$PATH"
msg "Sourcing asdf in your shell"
. "$ASDF_PATH/asdf.sh"
. "$ASDF_DIR/asdf.sh"
# Update asdf, and plugins
asdf update