# HG changeset patch # User zegervdv # Date 1664728998 -7200 # Node ID 6aabd0b8d766cfccd3f2324a2b82f90d7eaf86a2 # Parent e486254ef4207f738f265f10c9d341b7bdec3536 feat: install asdf directly without brew diff -r e486254ef420 -r 6aabd0b8d766 .chezmoiscripts/run_once_after_99-build-zsh-histdb-skim.sh.tmpl --- a/.chezmoiscripts/run_once_after_99-build-zsh-histdb-skim.sh.tmpl Sun Oct 02 18:22:00 2022 +0200 +++ b/.chezmoiscripts/run_once_after_99-build-zsh-histdb-skim.sh.tmpl Sun Oct 02 18:43:18 2022 +0200 @@ -1,7 +1,7 @@ {{ if (or (eq .chezmoi.os "linux") (eq .chezmoi.os "darwin")) -}} #!/usr/bin/env zsh -source $(brew --prefix asdf)/libexec/asdf.sh +source $HOME/.asdf/asdf.sh asdf shell rust 1.64.0 brew unlink sqlite diff -r e486254ef420 -r 6aabd0b8d766 .chezmoiscripts/run_onchange_after_20-install-asdf-plugins.sh.tmpl --- a/.chezmoiscripts/run_onchange_after_20-install-asdf-plugins.sh.tmpl Sun Oct 02 18:22:00 2022 +0200 +++ b/.chezmoiscripts/run_onchange_after_20-install-asdf-plugins.sh.tmpl Sun Oct 02 18:43:18 2022 +0200 @@ -3,6 +3,20 @@ # asdf globals tools hash: {{ include "dot_tool-versions" | sha256sum }} +ASDF_INSTALL="$HOME/.asdf" +ASDF_VERSION="v0.10.2" + +if [[ -d "$ASDF_INSTALL" ]] +then + cd "$ASDF_INSTALL" + git pull + git checkout "$ASDF_VERSION" +else + git clone https://github.com/asdf-vm/asdf.git "$ASDF_INSTALL" --branch="$ASDF_VERSION" +fi + +source ${ASDF_INSTALL}/asdf.sh + asdf_plugin_add() { if ! asdf plugin-list | grep -Fq "$1" then @@ -15,6 +29,7 @@ asdf_plugin_add python asdf_plugin_add neovim asdf_plugin_add direnv +asdf_plugin_add rust asdf_plugin_add sqlite asdf install diff -r e486254ef420 -r 6aabd0b8d766 dot_Brewfile --- a/dot_Brewfile Sun Oct 02 18:22:00 2022 +0200 +++ b/dot_Brewfile Sun Oct 02 18:43:18 2022 +0200 @@ -24,5 +24,4 @@ brew "git" brew "zegervdv/tools/cbfmt" brew "pass" -brew "asdf" brew "zsh" diff -r e486254ef420 -r 6aabd0b8d766 dot_zshrc --- a/dot_zshrc Sun Oct 02 18:22:00 2022 +0200 +++ b/dot_zshrc Sun Oct 02 18:43:18 2022 +0200 @@ -249,11 +249,8 @@ [ -f ~/.zshrc.local ] && source ~/.zshrc.local -# Must run after brew is loaded -if command -v brew &> /dev/null -then - source $(brew --prefix asdf)/libexec/asdf.sh -fi +source $HOME/.asdf/asdf.sh +fpath=(${ASDF_DIR}/completions $fpath) if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/zshrc" ] then