From: Ruben Beltran del Rio Date: Mon, 28 Jun 2021 18:36:47 +0000 (+0200) Subject: Add provisioning command X-Git-Url: https://git.r.bdr.sh/rbdr/dotfiles/commitdiff_plain/8bf2adeececb300944479c7a07ff8c6c0af9f4a5?hp=484003107180c171a169999e7a8eb161db509071 Add provisioning command --- diff --git a/README.md b/README.md index 987bbfe..4d64750 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,26 @@ It provides configuration for: * vim * nethack * terminfo italics support + +## Provisioning + +These dotfiles include some provisioning scripts for `brew` and `apt`. + +To set up run `./provision ` where `` is one of: + +* `essential` +* `nice` +* `cask_essential` (only `brew`) +* `cask_nice` (only `brew`) + +To see what each recipe installs, check the files under `provisioning/` + +## Local zshrc + +For local modifications to the zshrc create `~/.zshrc.local`. + +## Environment modification + +In order to specify the environment in the prompt, create a function +called `env_info_provider` and echo your environment details (eg. +`dev`, `staging`, `production`) diff --git a/install_dotfiles b/install_dotfiles index b4fa7f8..f9b8a50 100755 --- a/install_dotfiles +++ b/install_dotfiles @@ -2,17 +2,7 @@ echo "Installing essential software" -if command -v brew &> /dev/null; then - cat ./provisioning/brew_essential | xargs brew install -else - if command -v apt &> /dev/null; then - echo "Warning: ASDF needs to be installed manually" - cat ./provisioning/apt_essential | xargs apt install - else - echo "Error: No valid package manager. Make sure brew or apt are available." - exit 1 - fi -fi +./provision essential echo "Linking runcoms" diff --git a/provision b/provision new file mode 100755 index 0000000..d36cced --- /dev/null +++ b/provision @@ -0,0 +1,23 @@ +#!/usr/bin/env sh + +if [[ -z "$1" ]]; then + echo "Run with parameters: essential, nice, cask_essential, or cask_nice" +else + if command -v brew &> /dev/null; then + command_name="brew" + else + if command -v apt &> /dev/null; then + command_name="brew" + else + echo "Error: No valid package manager. Make sure brew or apt are available." + exit 1 + fi + fi + file="./provisioning/${command_name}_$1" + if [[ -f $file ]]; then + echo "Provisioning $1 with $command_name" + cat ./provisioning/${command_name}_$1 | xargs ${command_name} install + else + echo "No provisioning recipe for $1 with $command_name" + fi +fi diff --git a/provisioning/brew_cask_essential b/provisioning/brew_cask_essential new file mode 100644 index 0000000..c701727 --- /dev/null +++ b/provisioning/brew_cask_essential @@ -0,0 +1,13 @@ +--cask +1password +amethyst +bartender +clipy +docker +firefox-beta +kitty +multifirefox +obsidian +quicksilver +recordit +tresorit diff --git a/provisioning/brew_cask_nice b/provisioning/brew_cask_nice new file mode 100644 index 0000000..c2ecba1 --- /dev/null +++ b/provisioning/brew_cask_nice @@ -0,0 +1,19 @@ +--cask +daisydisk +dash +figma +google-chrome +karabiner-elements +keyboard-cleaner +loopback +macvim +omnigraffle +omniplan +osxfuse +paw +sequel-pro +signal +soulver +timeular +veracrypt +zoomus