From 2c83daa4d05113ddc477bbd0f5a1f89b40cf10ae Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Tue, 24 Jan 2023 07:26:34 +0000 Subject: [PATCH] Update 2 files - /home/private_dot_config/tabby/plugins/run_onchange_after_install-tabby-plugins.tmpl - /home/.chezmoitemplates/universal/common-dependencies --- .../universal/common-dependencies | 2 ++ ...un_onchange_after_install-tabby-plugins.tmpl | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 home/private_dot_config/tabby/plugins/run_onchange_after_install-tabby-plugins.tmpl diff --git a/home/.chezmoitemplates/universal/common-dependencies b/home/.chezmoitemplates/universal/common-dependencies index 52284a17..6694e06e 100644 --- a/home/.chezmoitemplates/universal/common-dependencies +++ b/home/.chezmoitemplates/universal/common-dependencies @@ -1,6 +1,8 @@ +# bison required for ASDF PHP installation {{- $packages := list "age" "bash" + "bison" "coreutils" "curl" "expect" diff --git a/home/private_dot_config/tabby/plugins/run_onchange_after_install-tabby-plugins.tmpl b/home/private_dot_config/tabby/plugins/run_onchange_after_install-tabby-plugins.tmpl new file mode 100644 index 00000000..4fe1af4e --- /dev/null +++ b/home/private_dot_config/tabby/plugins/run_onchange_after_install-tabby-plugins.tmpl @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +{{ includeTemplate "universal/profile" }} +{{ includeTemplate "universal/logg" }} + +if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/package-lock.json" ]; then + if [ -d "${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/node_modules" ]; then + logg info 'Skipping Tabby plugin installation because it looks like the plugins were already installed since `node_modules` is present in ~/.config/tabby/plugins' + else + logg info 'Installing Tabby plugins defined in `'"${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/package-lock.json"'`' + cd "${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/package-lock.json" + npm install + logg success 'Finished installing Tabby plugins' + fi +else + logg info 'Skipping Tabby plugin installation because is not present' +fi