install.fairie/home/.chezmoiscripts/universal/run_onchange_after_26-vscode-extensions.tmpl
Brian Zalewski 0cd37a6183 Update 8 files
- /home/dot_var/app/com.visualstudio.code/config/symlink_Code
- /home/dot_var/app/com.visualstudio.code/config/private_Code/symlink_User
- /home/.chezmoiremove
- /home/private_dot_config/private_Code/User/extensions.json
- /home/.chezmoiscripts/universal/run_onchange_after_26-vscode-extensions.tmpl
- /home/Library/Application Support/VSCodium/symlink_User
- /home/Library/Application Support/Code/symlink_User
- /software.yml
2023-01-24 22:50:28 +00:00

39 lines
1.4 KiB
Cheetah

{{- if (eq .host.distro.family "linux") -}}
#!/usr/bin/env bash
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
### Install Visual Studio Code extensions
if command -v code > /dev/null; then
EXTENSIONS="$(code --list-extensions)"
jq -r '.recommendations[]' "${XDG_CONFIG_HOME:-$HOME/.config}/Code/User/extensions.json" | while read EXTENSION; do
if ! echo "$EXTENSIONS" | grep -iF "$EXTENSION" > /dev/null; then
logg info 'Installing Visual Studio Code extension `'"$EXTENSION"'`'
code --install-extension "$EXTENSION"
logg success 'Installed `'"$EXTENSION"'`'
else
logg info '`'"$EXTENSION"'` already installed'
fi
done
else
logg warn '`code` executable not available'
fi
### Install VSCodium extensions
if command -v codium > /dev/null; then
EXTENSIONS="$(codium --list-extensions)"
jq -r '.recommendations[]' "${XDG_CONFIG_HOME:-$HOME/.config}/Code/User/extensions.json" | while read EXTENSION; do
if ! echo "$EXTENSIONS" | grep -iF "$EXTENSION" > /dev/null; then
logg info 'Installing VSCodium extension `'"$EXTENSION"'`'
codium --install-extension "$EXTENSION"
logg success 'Installed `'"$EXTENSION"'`'
else
logg info '`'"$EXTENSION"'` already installed'
fi
done
else
logg warn '`codium` executable not available'
fi
{{ end -}}