2022-11-18 21:51:46 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-11-29 22:26:34 -08:00
|
|
|
# Install Homebrew
|
|
|
|
if ! type brew &> /dev/null; then
|
|
|
|
if type sudo &> /dev/null && sudo -n true; then
|
|
|
|
echo | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
2022-11-18 21:51:46 -08:00
|
|
|
else
|
2022-11-29 22:26:34 -08:00
|
|
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
2022-11-18 21:51:46 -08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2022-11-29 22:26:34 -08:00
|
|
|
# Install Homebrew bundle and go-task
|
|
|
|
brew install go-task/tap/go-task
|
|
|
|
brew install jq
|
|
|
|
brew install yq
|
2022-11-18 21:51:46 -08:00
|
|
|
|
2022-11-29 22:26:34 -08:00
|
|
|
# Ensure dotfiles are present
|
|
|
|
if [ ! -f "$HOME/.local/bin/install-dotfiles" ]; then
|
|
|
|
bash <(curl -sSL https://gitlab.com/megabyte-labs/misc/dotfiles/-/raw/master/dotfiles/.local/bin/install-dotfiles)
|
|
|
|
else
|
|
|
|
chmod +x "$HOME/.local/bin/install-dotfiles"
|
|
|
|
install-dotfiles
|
2022-11-19 06:24:54 -08:00
|
|
|
fi
|
2022-11-19 05:08:32 -08:00
|
|
|
|
2022-11-29 22:26:34 -08:00
|
|
|
# Use run alias to invoke the `$HOME/.local/Taskfile.yml`
|
|
|
|
if [ -z "$1" ]; then
|
|
|
|
run localhost:provision
|
2022-11-19 06:24:54 -08:00
|
|
|
else
|
2022-11-29 22:26:34 -08:00
|
|
|
run "localhost:provision:$1"
|
2022-11-19 06:24:54 -08:00
|
|
|
fi
|