Mercurial > dotfiles
annotate .chezmoiscripts/run_onchange_after_20-install-asdf-plugins.sh.tmpl @ 775:951fb526b510
feat: enable new linematch diffopt
author | zegervdv <zegervdv@me.com> |
---|---|
date | Tue, 11 Apr 2023 07:22:48 +0200 |
parents | 1896bcf3fdb8 |
children |
rev | line source |
---|---|
754
1896bcf3fdb8
fix: handle templated scripts correctly on macOS (#10)
Zeger Van de Vannet <747627+zegervdv@users.noreply.github.com>
parents:
745
diff
changeset
|
1 {{ if (or (eq .chezmoi.os "darwin") (and (eq .chezmoi.os "linux") (ne .chezmoi.arch "arm64") (ne .chezmoi.osRelease.id "centos"))) -}} |
663
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
2 #!/usr/bin/env bash |
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
3 |
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
4 # asdf globals tools hash: {{ include "dot_tool-versions" | sha256sum }} |
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
5 |
687
6aabd0b8d766
feat: install asdf directly without brew
zegervdv <zegervdv@me.com>
parents:
686
diff
changeset
|
6 ASDF_INSTALL="$HOME/.asdf" |
6aabd0b8d766
feat: install asdf directly without brew
zegervdv <zegervdv@me.com>
parents:
686
diff
changeset
|
7 ASDF_VERSION="v0.10.2" |
6aabd0b8d766
feat: install asdf directly without brew
zegervdv <zegervdv@me.com>
parents:
686
diff
changeset
|
8 |
6aabd0b8d766
feat: install asdf directly without brew
zegervdv <zegervdv@me.com>
parents:
686
diff
changeset
|
9 if [[ -d "$ASDF_INSTALL" ]] |
6aabd0b8d766
feat: install asdf directly without brew
zegervdv <zegervdv@me.com>
parents:
686
diff
changeset
|
10 then |
6aabd0b8d766
feat: install asdf directly without brew
zegervdv <zegervdv@me.com>
parents:
686
diff
changeset
|
11 cd "$ASDF_INSTALL" |
6aabd0b8d766
feat: install asdf directly without brew
zegervdv <zegervdv@me.com>
parents:
686
diff
changeset
|
12 git pull |
6aabd0b8d766
feat: install asdf directly without brew
zegervdv <zegervdv@me.com>
parents:
686
diff
changeset
|
13 git checkout "$ASDF_VERSION" |
6aabd0b8d766
feat: install asdf directly without brew
zegervdv <zegervdv@me.com>
parents:
686
diff
changeset
|
14 else |
6aabd0b8d766
feat: install asdf directly without brew
zegervdv <zegervdv@me.com>
parents:
686
diff
changeset
|
15 git clone https://github.com/asdf-vm/asdf.git "$ASDF_INSTALL" --branch="$ASDF_VERSION" |
6aabd0b8d766
feat: install asdf directly without brew
zegervdv <zegervdv@me.com>
parents:
686
diff
changeset
|
16 fi |
6aabd0b8d766
feat: install asdf directly without brew
zegervdv <zegervdv@me.com>
parents:
686
diff
changeset
|
17 |
6aabd0b8d766
feat: install asdf directly without brew
zegervdv <zegervdv@me.com>
parents:
686
diff
changeset
|
18 source ${ASDF_INSTALL}/asdf.sh |
6aabd0b8d766
feat: install asdf directly without brew
zegervdv <zegervdv@me.com>
parents:
686
diff
changeset
|
19 |
663
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
20 asdf_plugin_add() { |
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
21 if ! asdf plugin-list | grep -Fq "$1" |
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
22 then |
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
23 asdf plugin-add "$1" |
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
24 else |
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
25 echo "asdf plugin $1 already installed" |
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
26 fi |
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
27 } |
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
28 |
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
29 asdf_plugin_add python |
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
30 asdf_plugin_add neovim |
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
31 asdf_plugin_add direnv |
687
6aabd0b8d766
feat: install asdf directly without brew
zegervdv <zegervdv@me.com>
parents:
686
diff
changeset
|
32 asdf_plugin_add rust |
686
e486254ef420
fix: improve asdf installer script
zegervdv <zegervdv@me.com>
parents:
680
diff
changeset
|
33 asdf_plugin_add sqlite |
663
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
34 |
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
35 asdf install |
680 | 36 asdf direnv setup --shell zsh --version latest |
37 | |
666
c6b8132ce55f
fix order of loading zsh scripts
zegervdv <zegervdv@me.com>
parents:
663
diff
changeset
|
38 asdf reshim |
663
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
39 |
fdce323431f4
Add asdf and config for python, neovim and direnv
zegervdv <zegervdv@me.com>
parents:
diff
changeset
|
40 {{ end -}} |