install.fairie/dotfiles/.local/share/chezmoi/run_once_provision

43 lines
2 KiB
Text

#!/usr/bin/env zx
# Examples of /etc/os-release values https://gist.github.com/natefoo/814c5bf936922dad97ff
# Example fromJson with include from file https://github.com/twpayne/chezmoi/issues/1369
{{ $packageMap := (get .installerMap $packageName) }}
{{ if (hasKey $packageMap "_deps") }}
{{ $deps := (get $packageMap "_deps") }}
{{ range index $deps }}
{{ }}
{{ end }}
{{ if (eq .chezmoi.os "windows") }}
{{ $managers := (list "whalebrew" "choco" "scoop" "winget" "go" "cargo" "npm" "pipx" "gem" "binary") }}
{{ else if (eq .chezmoi.os "darwin") }}
{{ $managers := (list "whalebrew" "brew" "port" "go" "cargo" "npm" "pipx" "gem" "cask" "binary") }}
{{ else if (eq .chezmoi.os "freebsd") }}
{{ $managers := (list "whalebrew" "pkg" "go" "cargo" "npm" "gem") }}
{{ else if (eq .chezmoi.os "android") }}
{{ $managers := (list "apk") }}
{{ else if (eq .chezmoi.os "linux") and (eq .chezmoi.osRelease "arch") }}
{{ $managers := (list "flatpak" "snap" "whalebrew" "pacman" "brew" "yay" "go" "cargo" "npm" "pipx" "gem" "appimage" "binary") }}
{{ else if (eq .chezmoi.os "linux") and (eq .chezmoi.osRelease "centos") }}
{{ $managers := (list "flatpak" "snap" "whalebrew" "dnf" "brew" "go" "cargo" "npm" "pipx" "gem" "appimage" "binary") }}
{{ else if (eq .chezmoi.os "linux") and (eq .chezmoi.osRelease "debian") }}
{{ $managers := (list "flatpak" "snap" "whalebrew" "apt" "brew" "go" "cargo" "npm" "pipx" "gem" "appimage" "binary") }}
{{ else if (eq .chezmoi.os "linux") and (eq .chezmoi.osRelease "fedora") }}
{{ $managers := (list "flatpak" "snap" "whalebrew" "dnf" "brew" "go" "cargo" "npm" "pipx" "gem" "appimage" "binary") }}
{{ else if (eq .chezmoi.os "linux") and (eq .chezmoi.osRelease "opensuse") }}
{{ $managers := (list "flatpak" "snap" "whalebrew" "zypper" "brew" "go" "cargo" "npm" "pipx" "gem" "appimage" "binary") }}
{{ else if (eq .chezmoi.os "linux") and (eq .chezmoi.osRelease "ubuntu") }}
{{ $managers := (list "flatpak" "snap" "whalebrew" "apt" "brew" "go" "cargo" "npm" "pipx" "gem" "appimage" "binary") }}
{{ end }}