-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bootstrap.sh
31 lines (25 loc) · 1.04 KB
/
.bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
# shellcheck disable=SC2016
#
# Equivalent to running `sh -c "$(curl -fsLS get.chezmoi.io)" -- init grendel-consulting`
set -euo pipefail
xcode-select --install || echo "XCode already installed"
if which -s brew; then
echo 'Great, Homebrew (or Workbrew) already installed'
else
# We're using Workbrew, so this should be run once that has been installed by your MDM
if [ -x "/opt/workbrew/bin/brew" ]; then
{
echo 'ZSH_VERSION=$(zsh --version | cut -d' ' -f2 | cut -d'.' -f1,2)'
echo 'export FPATH="/usr/share/zsh/site-functions:/usr/share/zsh/$ZSH_VERSION/functions:$FPATH"'
echo 'eval "$(/opt/workbrew/bin/brew shellenv)"'
} >> "$HOME"/.zprofile
eval "$(/opt/workbrew/bin/brew shellenv)"
else
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> "$HOME"/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
fi
brew install chezmoi
chezmoi init grendel-consulting