From 66f00729a6c522e5a667a0fc9b616240f1241639 Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Fri, 18 Aug 2023 14:36:25 -0400 Subject: [PATCH] Run script on macOS only --- ...ore_10-install-darwin-dependencies.sh.tmpl | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/home/.chezmoiscripts/universal/run_onchange_before_10-install-darwin-dependencies.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_before_10-install-darwin-dependencies.sh.tmpl index 8b8a2a1c..2272b593 100644 --- a/home/.chezmoiscripts/universal/run_onchange_before_10-install-darwin-dependencies.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_before_10-install-darwin-dependencies.sh.tmpl @@ -1,4 +1,3 @@ -{{- if (ne .host.distro.family "darwin") -}} #!/usr/bin/env bash # @file macOS Common Dependencies # @brief Ensures common system dependencies are installed via Homebrew on macOS @@ -14,25 +13,27 @@ export VOLTA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/volta" export PATH="$VOLTA_HOME/bin:$PATH" -if command -v brew > /dev/null; then - logg 'Installing base dependencies for macOS using `brew bundle`' - logg info 'Dependencies: age asdf jq node glow go go-task/tap/go-task gnupg gum m-cli progress volta yq m-cli yq zx' - logg info 'GNU compatibility dependencies: coreutils findutils' +### Ensure system is macOS +if [ -d /Applications ] && [ -d /System ]; then + if command -v brew > /dev/null; then + logg 'Installing base dependencies for macOS using `brew bundle`' + logg info 'Dependencies: age asdf jq node glow go go-task/tap/go-task gnupg gum m-cli progress volta yq m-cli yq zx' + logg info 'GNU compatibility dependencies: coreutils findutils' - brew bundle --verbose --no-lock --file=/dev/stdin <