volllly/rotz

Support per-distribution install commands

Opened this issue · 0 comments

(Just migrated over to rotz, really nice - thanks!)

We can set install commands per OS (eg, Darwin vs Linux), but there's no way to set different install commands per distro.

In my case, I use Darwin, Ubuntu and Arch Linux. I can have different commands in defaults.yml for darwin and linux, but my linux command can be either apt or pacman which means install will only work on 1 of those distributions.

Current

linux:
  installs: sudo apt install -y {{ name }}

darwin:
  installs:
    cmd: brew install {{ name }}
    depends:
      - brew

Desired (Suggestion)

Reading /etc/os-release (if available) could let us define keys based on the value of ID perhaps:

linux:
  ubuntu:
    installs: sudo apt install -y {{ name }}
  arch:
    installs: sudo pacman -S --noconfirm {{ name }}

darwin:
  installs:
    cmd: brew install {{ name }}
    depends:
      - brew