2023-08-08 00:06:49 -07:00
|
|
|
---
|
|
|
|
title: macOS Common Dependencies
|
|
|
|
description: Ensures common system dependencies are installed via Homebrew on macOS
|
|
|
|
sidebar_label: 10 macOS Common Dependencies
|
|
|
|
slug: /scripts/before/run_onchange_before_10-install-darwin-dependencies.sh.tmpl
|
|
|
|
githubLocation: https://github.com/megabyte-labs/install.doctor/blob/master/home/.chezmoiscripts/universal/run_onchange_before_10-install-darwin-dependencies.sh.tmpl
|
|
|
|
scriptLocation: https://github.com/megabyte-labs/install.doctor/raw/master/home/.chezmoiscripts/universal/run_onchange_before_10-install-darwin-dependencies.sh.tmpl
|
|
|
|
repoLocation: home/.chezmoiscripts/universal/run_onchange_before_10-install-darwin-dependencies.sh.tmpl
|
|
|
|
---
|
|
|
|
# macOS Common Dependencies
|
|
|
|
|
|
|
|
Ensures common system dependencies are installed via Homebrew on macOS
|
|
|
|
|
|
|
|
## Overview
|
|
|
|
|
|
|
|
This script ensures packages that are commonly used by other packages or needed by Install Doctor, are installed
|
|
|
|
via Homebrew. The list of packages is defined in `home/.chezmoitemplates/darwin/Brewfile`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Source Code
|
|
|
|
|
|
|
|
```
|
|
|
|
{{- 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
|
|
|
|
# @description
|
|
|
|
# This script ensures packages that are commonly used by other packages or needed by Install Doctor, are installed
|
|
|
|
# via Homebrew. The list of packages is defined in `home/.chezmoitemplates/darwin/Brewfile`.
|
|
|
|
|
|
|
|
# darwin/Brewfile hash: {{ include (joinPath ".chezmoitemplates" "darwin" "Brewfile") | sha256sum }}
|
|
|
|
|
|
|
|
{{ includeTemplate "universal/profile-before" }}
|
|
|
|
{{ includeTemplate "universal/logg-before" }}
|
|
|
|
|
|
|
|
if command -v brew > /dev/null; then
|
2023-11-04 18:46:18 -07:00
|
|
|
logg 'Installing base dependencies for macOS using brew bundle'
|
2023-08-08 00:06:49 -07:00
|
|
|
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 <<EOF
|
|
|
|
{{ includeTemplate "darwin/Brewfile" . -}}
|
|
|
|
EOF
|
|
|
|
else
|
2023-11-04 18:46:18 -07:00
|
|
|
logg error 'brew was not found in the PATH'
|
2023-08-08 00:06:49 -07:00
|
|
|
fi
|
|
|
|
{{ end -}}
|
|
|
|
```
|