#!/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 echo "Run once provision hook" {{ $packageMap := (get .installerMap $packageName) }} {{ if (hasKey $packageMap "_deps") }} {{ $deps := (get $packageMap "_deps") }} {{ range index $deps }} {{ end }} {{ 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 and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease "arch") }} {{ $managers := (list "flatpak" "snap" "whalebrew" "pacman" "brew" "yay" "go" "cargo" "npm" "pipx" "gem" "appimage" "binary") }} {{ else if and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease "centos") }} {{ $managers := (list "flatpak" "snap" "whalebrew" "dnf" "brew" "go" "cargo" "npm" "pipx" "gem" "appimage" "binary") }} {{ else if and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease "debian") }} {{ $managers := (list "flatpak" "snap" "whalebrew" "apt" "brew" "go" "cargo" "npm" "pipx" "gem" "appimage" "binary") }} {{ else if and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease "fedora") }} {{ $managers := (list "flatpak" "snap" "whalebrew" "dnf" "brew" "go" "cargo" "npm" "pipx" "gem" "appimage" "binary") }} {{ else if and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease "opensuse") }} {{ $managers := (list "flatpak" "snap" "whalebrew" "zypper" "brew" "go" "cargo" "npm" "pipx" "gem" "appimage" "binary") }} {{ else if and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease "ubuntu") }} {{ $managers := (list "flatpak" "snap" "whalebrew" "apt" "brew" "go" "cargo" "npm" "pipx" "gem" "appimage" "binary") }} {{ end }}