install.fairie/home/.chezmoiscripts/universal/run_onchange_before_09-install-go.tmpl
Brian Zalewski 0ce5a3c77b Update 21 files
- /home/.chezmoiscripts/universal/run_onchange_after_85-remove-shortcuts.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_95-bootstrap-zsh-plugins.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_98-cleanup.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_99-restart-gnome.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_08-install-zx.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_09-node-version.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_10-remove-bloatware.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_11-install-docker.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_91-configure-gpg.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_85-remove-shortcuts.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_95-bootstrap-zsh-plugins.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_98-cleanup.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_99-restart-gnome.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_08-install-zx.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_09-install-go.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_09-node-version.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_10-remove-bloatware.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_11-install-docker.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_91-configure-gpg.sh.tmpl
2023-04-12 03:57:02 +00:00

26 lines
748 B
Cheetah

{{- if (ne .host.distro.family "windows") -}}
#!/usr/bin/env bash
# @file Go Install
# @brief Ensures Go is installed via Homebrew
# @description
# This script ensures Go is installed. It uses Homebrew to install Go.
{{ includeTemplate "universal/profile-before" }}
{{ includeTemplate "universal/logg-before" }}
### Ensure Go is installed
if ! command -v go > /dev/null; then
if command -v brew; then
logg 'Installing `go` via Homebrew'
brew install go || GO_EXIT_CODE=$?
if [ -n "$GO_EXIT_CODE" ]; then
logg error '`go` was not successfully installed via Homebrew'
fi
else
logg '`brew` is unavailable. Cannot use it to perform a system installation of node.'
fi
else
logg '`go` is available'
fi
{{ end -}}