this repo has no description
1#!/bin/bash
2set -euo pipefail
3set -vx
4
5echo "installing Rosetta..."
6/usr/bin/pgrep -q oahd || sudo softwareupdate --install-rosetta --agree-to-license
7
8echo "installing chezmoi..."
9brew install chezmoi
10
11echo "moving dotfiles for chezmoi..."
12# relocate the checkout to the usual ~/src/indirect/dotfiles location
13[[ -d ~/src/indirect ]] || mkdir -p ~/src/indirect
14[[ -d ~/src/indirect/dotfiles ]] || mv ~/.dotfiles ~/src/indirect/dotfiles
15
16# link the conventional .dotfiles location
17[[ -L ~/.dotfiles ]] || ln -sf ~/src/indirect/dotfiles ~/.dotfiles
18
19# link the chezmoi ~/.local/share/chezmoi location
20[[ -d ~/.local/share ]] || mkdir -p ~/.local/share
21[[ -L ~/.local/share/chezmoi ]] || ln -sf ~/src/indirect/dotfiles ~/.local/share/chezmoi
22
23echo "initializing chezmoi..."
24chezmoi init
25
26echo "configuring zsh..."
27chezmoi apply ~/.zshenv ~/p10k.zsh ~/.zsh ~/.zshrc
28
29echo "setting up Brewfile"
30chezmoi apply ~/.Brewfile
31chezmoi apply --source-path ~/.dotfiles/run_onchange_brew_bundle.sh.tmpl