]> git.r.bdr.sh - rbdr/dotfiles/commitdiff
Add provisioning command
authorRuben Beltran del Rio <redacted>
Mon, 28 Jun 2021 18:36:47 +0000 (20:36 +0200)
committerRuben Beltran del Rio <redacted>
Mon, 28 Jun 2021 18:36:47 +0000 (20:36 +0200)
README.md
install_dotfiles
provision [new file with mode: 0755]
provisioning/brew_cask_essential [new file with mode: 0644]
provisioning/brew_cask_nice [new file with mode: 0644]

index 987bbfec58f54af7fadd20347d066491b8a154a5..4d64750300ef6a459c29d40321b9cc397e03b4d2 100644 (file)
--- 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 <recipe>` where `<recipe>` 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`)
index b4fa7f8e8989a394bf0321a1b350f36c4b3d4d3e..f9b8a50db976d2f3abc532dd55e266f9b2d2fca6 100755 (executable)
@@ -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 (executable)
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 (file)
index 0000000..c701727
--- /dev/null
@@ -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 (file)
index 0000000..c2ecba1
--- /dev/null
@@ -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