From f1243af580b90a2f36548bbd0fc2baf3cf34e368 Mon Sep 17 00:00:00 2001 From: Joe Lillibridge Date: Thu, 31 Oct 2024 16:26:48 -0500 Subject: [PATCH] wip --- .config/yadm/bootstrap##template | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.config/yadm/bootstrap##template b/.config/yadm/bootstrap##template index dd4929f..462ac49 100755 --- a/.config/yadm/bootstrap##template +++ b/.config/yadm/bootstrap##template @@ -1,14 +1,22 @@ #!/bin/bash - # WARNING: Do not edit this file. # It was generated by processing {{ yadm.source }} -# Save this file as ~/.config/yadm/bootstrap and make it executable. It will -# execute all executable files (excluding templates and editor backups) in the -# ~/.config/yadm/bootstrap.d directory when run. - set -eu +{% if yadm.os == "Darwin" %} +# install homebrew if it's missing +if ! command -v brew >/dev/null 2>&1; then +echo "Installing homebrew" +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +fi + +if [ -f "$HOME/.Brewfile" ]; then +echo "Updating homebrew bundle" +brew bundle --global +fi +{% endif %} + # Directory to look for bootstrap executables in BOOTSTRAP_D="${BASH_SOURCE[0]}.d"