{{- /* The install shortcode's tabs, written here once for its HTML and its Markdown copy: macOS's Homebrew, then Linux's install script, each a name and its Markdown. Takes the page and the shortcode's position. */ -}} {{- $script := "curl -fsSL https://github.com/devvmhq/devvm/releases/latest/download/install.sh | bash" -}} {{- $macNote := "The install script in the Linux tab also works on macOS." -}} {{- with site.GetPage "/docs/getting-started/install" -}} {{- if ne $.page . -}} {{- $macNote = printf "The install script in the Linux tab also works on macOS, and [Installing](%s#installing-devvm) lists its options." .RelPermalink -}} {{- end -}} {{- else -}} {{- errorf "install: no Installing page (%s)" .position -}} {{- end -}} {{- $mac := printf "```sh\n# Install devvm, and Lima with it\nbrew trust --formula devvmhq/tap/devvm\nbrew install devvmhq/tap/devvm\n```\n\n%s" $macNote -}} {{- $linux := printf "```sh\n# Install devvm and what it needs\n%s\n```\n\nThe script asks before it installs Lima, QEMU or access to `/dev/kvm`." $script -}} {{- return (slice (dict "name" "macOS" "content" $mac) (dict "name" "Linux" "content" $linux)) -}}