diff .chezmoiscripts/run_onchange_after_20-install-asdf-plugins.sh.tmpl @ 663:fdce323431f4

Add asdf and config for python, neovim and direnv
author zegervdv <zegervdv@me.com>
date Tue, 27 Sep 2022 05:55:05 +0000
parents
children c6b8132ce55f
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.chezmoiscripts/run_onchange_after_20-install-asdf-plugins.sh.tmpl	Tue Sep 27 05:55:05 2022 +0000
@@ -0,0 +1,21 @@
+{{ if (or (eq .chezmoi.os "linux") (eq .chezmoi.os "darwin")) -}}
+#!/usr/bin/env bash
+
+# asdf globals tools hash: {{ include "dot_tool-versions" | sha256sum }}
+
+asdf_plugin_add() {
+  if ! asdf plugin-list | grep -Fq "$1"
+  then
+    asdf plugin-add "$1"
+  else
+    echo "asdf plugin $1 already installed"
+  fi
+}
+
+asdf_plugin_add python
+asdf_plugin_add neovim
+asdf_plugin_add direnv
+
+asdf install
+
+{{ end -}}